Websocket API - Subscribe to entities state change

Hi. Is it possible to subscribe to state change events for a set of entities or a group via the websocket API please?

yes it is possible, but with a different approach…
first subscribe to state_changes with:
https://developers.home-assistant.io/docs/api/websocket#subscribe-to-events

then, when any event came,
make a list in your code, check
“type”:“event”
then
event.data.event_type:“state_changed”
then
event.data.new_state.entity_id -> your entity