Subscribe to event when light changed

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

Hi @DisasterRec0very,

Did you find the solution to this? I’m looking into this as well to build a front-end in vue using the websockets which would deliver a fast and realiable connection to the HA instance.
However I’m also interested in targeting specific entities to subscribe to, in order to work more effective.

In the official dev docs I can find this:
## Subscribe to trigger

You can also subscribe to one or more triggers with subscribe_trigger

So it should be possible, but can’t seem to find this in the docs.
Any help is appreciated.

Thanks
Pieter