You can see in picture below, when TV is on Peacock, source lists it as such.
What would I setup to start an automation right when the source is switched to Peacock? All I can think is having an inject node check every 1 min, but theres gotta be some way I can use the events: state
node; I just cant figure it out.
[{"id":"d5a8639e.d33e","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"c8fb8893.957528","type":"inject","z":"d5a8639e.d33e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1213,"y":45,"wires":[["4fb664dc.480cec"]]},{"id":"4fb664dc.480cec","type":"api-current-state","z":"d5a8639e.d33e","name":"","server":"ab3e2c53.e3491","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.tv_living_room","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1125,"y":144,"wires":[["4a922c9b.139044"]]},{"id":"4a922c9b.139044","type":"switch","z":"d5a8639e.d33e","name":"Check if source is Peacock","property":"data.attributes.source","propertyType":"msg","rules":[{"t":"cont","v":"Peacock","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":1147,"y":225,"wires":[["cc7b8f92.f30f1"],[]]},{"id":"cc7b8f92.f30f1","type":"api-call-service","z":"d5a8639e.d33e","name":"Toggle test3","server":"ab3e2c53.e3491","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"toggle","entityId":"input_boolean.test3","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1133,"y":306,"wires":[[]]},{"id":"ab3e2c53.e3491","type":"server","name":"AvilaSmartHomeRpi","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]