Bear with me here; this is a bit convoluted. The short version is, when I instruct Home Assistant (“hass”, current version as of today) to scene.turn_on
, hass tries to check the state of the entity against the definition of the scene, and thus refuses to work if it already thinks that the scene meets my conditions. I want to force the scene, because I’m smarter than hass.
Here’s proof from the log:
2020-04-28 16:16:24 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140153514010896] Received {'type': 'call_service', 'domain': 'scene', 'service': 'turn_on', 'service_data': {'entity_id': 'scene.first_floor_from_foyer_on'}, 'id': 36}
2020-04-28 16:16:24 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=scene, service=turn_on, service_data=entity_id=scene.first_floor_from_foyer_on>
2020-04-28 16:16:24 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=switch, service=turn_on, service_data=entity_id=switch.first_floor_from_foyer_insteon_scene>
2020-04-28 16:16:24 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=switch.first_floor_from_foyer_insteon_scene, old_state=<state switch.first_floor_from_foyer_insteon_scene=off; friendly_name=First Floor from Foyer Insteon Scene, assumed_state=True @ 2020-04-28T16:13:02.548131-04:00>, new_state=<state switch.first_floor_from_foyer_insteon_scene=on; friendly_name=First Floor from Foyer Insteon Scene, assumed_state=True @ 2020-04-28T16:16:24.591618-04:00>>
2020-04-28 16:16:24 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=mqtt, service=publish, service_data=topic=insteon/modem/scene, qos=0, retain=False, payload={ "cmd" : "on", "group" : 3 }>
2020-04-28 16:16:24 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on insteon/modem/scene: { "cmd" : "on", "group" : 3 }
This scene turns on okay. Note that this scene is a single “switch,” which is really a stateless MQTT switch to execute an Insteon scene with multiple lights. It’s “optimistic,” because Insteon scenes don’t have state, just like hass scenes.
Here, though, I want a different scene to turn off some of the same lights:
2020-04-28 16:18:23 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140153514010896] Received {'type': 'call_service', 'domain': 'scene', 'service': 'turn_on', 'service_data': {'entity_id': 'scene.first_floor_from_laundry_off'}, 'id': 37}
2020-04-28 16:18:23 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=scene, service=turn_on, service_data=entity_id=scene.first_floor_from_laundry_off>
2020-04-28 16:18:23 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140153514010896] Sending {'id': 37, 'type': 'result', 'success': True, 'result': {'context': Context(user_id='2ad573921ff548419884dacf3eb59b60', parent_id=None, id='5d926cf5ac064dafac42d4413406bd51')}}
The Insteon scenes overlap; but because hass doesn’t think that the “switch” is on, so instead of following my scene instructions, just doesn’t run the service. This is where I’m smarter than hass.
One workaround, of course, is to stop using Insteon scenes; I’ve yet to try this with hass because past automation solutions tended to be slow, and Insteon scenes are lightning fast; I’d like to keep them if possible. Is there another workaround, or something I’m missing?
Thanks.