Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Call service with JSONata
[{"id":"9ca1657d.057fd8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"7cca5834.d24008","type":"api-call-service","z":"9ca1657d.057fd8","name":"Change office lightstrip","server":"8501408e.93b69","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.office_lightstrip","data":"{\t \"brightness\": msg.data.new_state.attributes.brightness,\t \"rgb_color\": msg.data.new_state.attributes.rgb_color\t}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":540,"y":120,"wires":[["1489ac11.df6254"]]},{"id":"b8f1a35c.90226","type":"server-state-changed","z":"9ca1657d.057fd8","name":"Bedroom lightstrip changed","server":"8501408e.93b69","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.bedroom_lightstrip","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":250,"y":120,"wires":[["7cca5834.d24008","8368091b.61e158"]]},{"id":"8368091b.61e158","type":"debug","z":"9ca1657d.057fd8","name":"Bedroom light info","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":530,"y":200,"wires":[]},{"id":"1489ac11.df6254","type":"debug","z":"9ca1657d.057fd8","name":"Office light info","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":780,"y":120,"wires":[]},{"id":"8501408e.93b69","type":"server","z":"","name":"Home Assistant"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment