Still an old thread. I was just digging into trying to detect this today and found this thread.
It seems there are 2 events that get triggered when scenes are changed from within Home Assistant.
State Change Event:
{
"event_type": "state_changed",
"entity_id": "scene.living_room_nightlight",
"event": {
"entity_id": "scene.living_room_nightlight",
"old_state": {
"entity_id": "scene.living_room_nightlight",
"state": "2023-07-04T21:06:43.832504+00:00",
"attributes": {
"group_name": "Living room",
"group_type": "room",
"name": "Nightlight",
"speed": 0.6031746031746031,
"brightness": 9.84,
"is_dynamic": false,
"friendly_name": "Living room Nightlight"
},
"last_changed": "2023-07-04T21:06:43.832701+00:00",
"last_updated": "2023-07-04T21:06:43.832701+00:00",
"context": {
"id": "01H4HBN8FQ1VANYBPVZFXXKRMK",
"parent_id": null,
"user_id": "502e0b8392d74ddb9da39e07bc227c96"
}
},
"new_state": {
"entity_id": "scene.living_room_nightlight",
"state": "2023-07-04T22:05:27.942749+00:00",
"attributes": {
"group_name": "Living room",
"group_type": "room",
"name": "Nightlight",
"speed": 0.6031746031746031,
"brightness": 9.84,
"is_dynamic": false,
"friendly_name": "Living room Nightlight"
},
"last_changed": "2023-07-04T22:05:27.943032+00:00",
"last_updated": "2023-07-04T22:05:27.943032+00:00",
"context": {
"id": "01H4HF0T03T7HVFT377787R0MS",
"parent_id": null,
"user_id": "502e0b8392d74ddb9da39e07bc227c96"
}
}
},
"origin": "LOCAL",
"time_fired": "2023-07-04T22:05:27.943032+00:00",
"context": {
"id": "01H4HF0T03T7HVFT377787R0MS",
"parent_id": null,
"user_id": "502e0b8392d74ddb9da39e07bc227c96"
}
}
Call Service Event:
{
"event_type": "call_service",
"event": {
"domain": "scene",
"service": "turn_on",
"service_data": {
"entity_id": [
"scene.living_room_nightlight"
]
}
},
"origin": "LOCAL",
"time_fired": "2023-07-04T22:05:27.940196+00:00",
"context": {
"id": "01H4HF0T03T7HVFT377787R0MS",
"parent_id": null,
"user_id": "502e0b8392d74ddb9da39e07bc227c96"
}
}
However, no event is fired when the scene is triggered via the Hue app. There is one case where the hue app does trigger a scene event, however. That’s when setting the “Natural Light” theme. Not sure why only that one triggers the HA event, and no others do, though.
If the fam can be trained to use the Home Assistant app to set scenes instead of the hue, you could definitely react to that. This is as close as I could get.