Hi,
I want to use the Websocket to trigger my app when something changed. Especially for lights the Event is not documented.
What do I have to send to the server to get only the state_changed from on to off (or vice versa) from one entity?
When I subscribe to all events my client gets too much messages and the response when a light is turned off it is not a regular “state_changed” event.
That’s what the default frontend receives:
{
"id": 3,
"type": "event",
"event": {
"c": {
"light.bulb_outd301": {
"+": { "s": "off", "lc": 1664579650.424921, "c": "01GE8AVGTVVE836MS05B072VFA" },
"-": { "a": ["color_temp", "hs_color", "xy_color", "effect", "rgb_color", "color_mode", "brightness"] }
}
}
}
}
So the response is an event, but not a regular one.
Can anybody open my eyes and point me to the right documentation page?
Use case to toggle a light and check the new state, quite simple for the beginning.
// Andreas