Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

Summary

Extends EntityMoreInfoDialogView to 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 domain: Toggle control using lock/unlock services with state-aware icons (locked/unlocked/jammed)
  • Input_boolean domain: Toggle control using toggle service
  • Climate domain: Temperature slider with HVAC mode selection, supporting set_temperature and set_hvac_mode services (EntityMoreInfoDialogView only)
  • Action domains (button, input_button, scene, script, automation): Unified SimpleActionView with domain-specific icons, labels, and services (press, turn_on, trigger)

New files:

  • Lock: LockControlsView.swift, LockControlsViewModel.swift
  • Input Boolean: InputBooleanControlsView.swift, InputBooleanControlsViewModel.swift
  • Climate: ClimateControlsView.swift, ClimateControlsViewModel.swift
  • Action domains: SimpleActionView.swift, SimpleActionViewModel.swift
  • Assets: lock.colorset, inputBoolean.colorset, climate.colorset

Modified:

  • EntityMoreInfoDialogView.swift: Added domain cases and view builders
  • Domain+AccentColor.swift: Added lock, input_boolean, and climate color mappings
  • Domain.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:

  • Temperature slider with configurable min/max/step from entity attributes
  • Current and target temperature display with unit support (°C/°F)
  • HVAC mode selection buttons with mode-specific icons
  • Disabled temperature control when climate is off
  • Optimistic UI updates

All implementations follow existing patterns: @Observable ViewModels, VerticalSlider for temperature control, VerticalToggleControl for 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 SimpleActionView consolidates 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

Add more domains support in HomeView and EntityMoreInfoDialogView


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@bgoncal
Copy link
Member

bgoncal commented Jan 7, 2026

@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

Copilot AI changed the title [WIP] Add more domains support in HomeView and EntityMoreInfoDialogView Add lock, input_boolean, button, scene, script, and automation domain support to EntityMoreInfoDialogView Jan 7, 2026
Copilot AI requested a review from bgoncal January 7, 2026 15:13
Copy link
Contributor Author

Copilot AI commented Jan 7, 2026

@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

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.

@bgoncal
Copy link
Member

bgoncal commented Jan 12, 2026

@copilot implement for "climate" domain as well

Copy link
Contributor Author

Copilot AI commented Jan 12, 2026

@copilot implement for "climate" domain as well

Climate domain support added in commit 594c915. Implementation includes:

  • Temperature slider with configurable min/max/step from entity attributes
  • Current and target temperature display with unit support (°C/°F)
  • HVAC mode selection buttons (off, heat, cool, auto, dry, fan_only)
  • Mode-specific icons (flame for heat, snowflake for cool, etc.)
  • Disabled temperature control when climate is off
  • Uses set_temperature and set_hvac_mode services

The climate domain was also added to CarPlay supported domains list.

Copilot AI changed the title Add lock, input_boolean, button, scene, script, and automation domain support to EntityMoreInfoDialogView Add lock, input_boolean, button, scene, script, automation, and climate domain support to EntityMoreInfoDialogView Jan 12, 2026
@bgoncal
Copy link
Member

bgoncal commented Jan 12, 2026

@copilot no changes should be done to CarPlay, remove Climate domain there

Copy link
Contributor Author

Copilot AI commented Jan 12, 2026

@copilot no changes should be done to CarPlay, remove Climate domain there

Climate domain removed from CarPlay supported domains list in commit ce5d00e. Climate is now only available in EntityMoreInfoDialogView.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants