Description
HassLightSet fails when targeting the bedroom light. Both plain-English name and entity ID formats return an error from Home Assistant.
Error: Service handler cannot target all devices
Steps to Reproduce
- Attempt to set brightness (or turn on) bedroom light via
hass(action="set_brightness", target="bedroom light", value=...) or Sonique voice equivalent
- Also attempted with
light.bedroom_light as target
- Both return:
Service handler cannot target all devices
Expected Behavior
The bedroom light should be targeted and controlled successfully.
Analysis
The hass() function passes args = {"name": target} to HassLightSet (hass.py:337). When HA's Assist pipeline cannot resolve name to a specific entity, it appears to fall back to targeting all devices — which HassLightSet rejects with this error.
Likely root causes:
- The friendly name
"bedroom light" doesn't match the entity's name in HA exactly enough for the Assist intent to resolve it
- Passing an entity ID (
light.bedroom_light) as the name field doesn't work because Assist intents expect friendly names, not entity IDs
- The device cache may resolve the device but the name passed to HA still doesn't match precisely
Possible Fix
When the device cache resolves a device and has an entity_id, consider passing it via a mechanism HA can target precisely (e.g., the raw service call with entity_id targeting rather than the Assist intent pipeline), or add stricter name normalization to match exactly against HA's entity friendly names.
Environment
- Reported: 2026-04-23 via Sonique voice
- Integration:
caal/integrations/hass.py
- Relevant code:
HassLightSet intent mapping at line 177, arg construction at line 337
Description
HassLightSetfails when targeting the bedroom light. Both plain-English name and entity ID formats return an error from Home Assistant.Error:
Service handler cannot target all devicesSteps to Reproduce
hass(action="set_brightness", target="bedroom light", value=...)or Sonique voice equivalentlight.bedroom_lightas targetService handler cannot target all devicesExpected Behavior
The bedroom light should be targeted and controlled successfully.
Analysis
The
hass()function passesargs = {"name": target}toHassLightSet(hass.py:337). When HA's Assist pipeline cannot resolvenameto a specific entity, it appears to fall back to targeting all devices — whichHassLightSetrejects with this error.Likely root causes:
"bedroom light"doesn't match the entity's name in HA exactly enough for the Assist intent to resolve itlight.bedroom_light) as thenamefield doesn't work because Assist intents expect friendly names, not entity IDsPossible Fix
When the device cache resolves a device and has an
entity_id, consider passing it via a mechanism HA can target precisely (e.g., the raw service call withentity_idtargeting rather than the Assist intent pipeline), or add stricter name normalization to match exactly against HA's entity friendly names.Environment
caal/integrations/hass.pyHassLightSetintent mapping at line 177, arg construction at line 337