Skip to content

Use ha-switch instead of ha-control-switch in entity toggle#51852

Open
piitaya wants to merge 1 commit intodevfrom
ha-switch-entities-toggle
Open

Use ha-switch instead of ha-control-switch in entity toggle#51852
piitaya wants to merge 1 commit intodevfrom
ha-switch-entities-toggle

Conversation

@piitaya
Copy link
Copy Markdown
Member

@piitaya piitaya commented May 4, 2026

Proposed change

Migrates ha-entity-toggle and hui-entities-toggle from ha-control-switch to ha-switch.

Motivation:

  • Beta feedback: ha-control-switch cannot currently be themed
  • Visually misaligned with the slider design
  • Inconsistent switches across pages (different switch in entity rows vs. settings forms)
  • Two switch components in the codebase doing the same job

Also adds a --ha-switch-min-touch-size CSS variable to ha-switch (defaults to 40px), mirroring the touch-target pattern already in ha-control-switch. This keeps the recommended 40px hit area even when the switch is sized compact (38×20 in entity toggle).

Screenshots

Entities card

Before
CleanShot 2026-05-04 at 14 29 14

After
CleanShot 2026-05-04 at 14 28 25

Group config flow

Before
CleanShot 2026-05-04 at 14 25 13

After
CleanShot 2026-05-04 at 14 26 59

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

In the future, we can consider changing the different UI component for entities card to better match tile card :

Design example proposal by dcapslock on discord :
image

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to backend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • I have followed the perfect PR recommendations
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

To help with the load of incoming pull requests:

@piitaya piitaya added the Needs UX Items requiring a review from the Home Assistant design team label May 4, 2026
@piitaya piitaya added this to the 2026.5 milestone May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed Needs UX Items requiring a review from the Home Assistant design team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant