-
Notifications
You must be signed in to change notification settings - Fork 407
Add lock, input_boolean, button, scene, script, automation, and climate domain support to EntityMoreInfoDialogView #4179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@copilot focus on domains that can be actionable, for now let's not add domains where we would only display the state and no interaction |
…InfoDialogView Co-authored-by: bgoncal <[email protected]>
Co-authored-by: bgoncal <[email protected]>
Confirmed - all domains added (lock, input_boolean, button, input_button, scene, script, automation) are actionable with user interactions. State-only domains like sensor, binary_sensor, zone, and person were intentionally excluded from this PR. |
|
@copilot implement for "climate" domain as well |
Co-authored-by: bgoncal <[email protected]>
Climate domain support added in commit 594c915. Implementation includes:
The climate domain was also added to CarPlay supported domains list. |
|
@copilot no changes should be done to CarPlay, remove Climate domain there |
Co-authored-by: bgoncal <[email protected]>
Summary
Extends
EntityMoreInfoDialogViewto support 8 additional domains, bringing total coverage from 4 to 12 domains. Adds toggle controls for stateful domains (lock, input_boolean), temperature controls for climate, and action buttons for execution-based domains (button, input_button, scene, script, automation).Implementation:
lock/unlockservices with state-aware icons (locked/unlocked/jammed)toggleserviceset_temperatureandset_hvac_modeservices (EntityMoreInfoDialogView only)SimpleActionViewwith domain-specific icons, labels, and services (press,turn_on,trigger)New files:
LockControlsView.swift,LockControlsViewModel.swiftInputBooleanControlsView.swift,InputBooleanControlsViewModel.swiftClimateControlsView.swift,ClimateControlsViewModel.swiftSimpleActionView.swift,SimpleActionViewModel.swiftlock.colorset,inputBoolean.colorset,climate.colorsetModified:
EntityMoreInfoDialogView.swift: Added domain cases and view buildersDomain+AccentColor.swift: Added lock, input_boolean, and climate color mappingsDomain.swift: Added climate domain and HVAC mode states (heat, cool, heat_cool, auto, dry, fan_only)Service.swift: Added climate services (set_temperature, set_hvac_mode)Climate Features:
All implementations follow existing patterns:
@ObservableViewModels,VerticalSliderfor temperature control,VerticalToggleControlfor toggles,Current.api(for:).CallService()for actions, optimistic UI updates, and comprehensive previews.Screenshots
Screenshots pending - requires running app with test entities for each domain type.
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes
The
SimpleActionViewconsolidates 5 action-based domains into a single reusable component, with domain-specific customization through the ViewModel (icons, labels, service selection). Climate domain support is available in EntityMoreInfoDialogView only and is not included in CarPlay supported domains.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.