My question is simple…
I successful subscribe to events from a webpage with long token with (summarized) this code:
socket.send(JSON.stringify({
"id": 3,
"type": "subscribe_events",
"event_type": "state_changed"
}));
Now, if i wish to subscribe to a specific event:
socket.send(JSON.stringify({
"id": 3,
"type": "subscribe_events",
"event_type": "state_changed",
"event_filter": {
"entity_id": "sensor.beb_consumo_istantaneo_condominio"
}
}));
it fails.
I can filter entity id with first code, but wish to reduce lan traffic…