I have the following flow setup for my garage doors.
When the door opens, it grabs the state and attributes of my WLED lights, then changes them to blinking red.
I’d like it so when the garage door closes, it returns the effect to what it was previously, but this is not working.
I feel I’m about 90% there, but I need help getting that last 10%.
Any thoughts on what I’m doing wrong?
[{"id":"c2489f41.8e4aa","type":"switch","z":"583ad8e1.7bd1f8","name":"open closed","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"open","vt":"str"},{"t":"eq","v":"closed","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":1300,"wires":[["901ed353.78035","7480ee41.862a"],["a2fca8b3.279828"]]},{"id":"901ed353.78035","type":"api-call-service","z":"583ad8e1.7bd1f8","name":"Red blinking","server":"bf8f8406.230b48","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.wled","data":"{\"effect\":\"blink\",\"brightness\":\"38\",\"rgb_color\":[255,0,0]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":690,"y":1280,"wires":[[]]},{"id":"2350c89b.370688","type":"api-call-service","z":"583ad8e1.7bd1f8","name":"Lights to previous state","server":"bf8f8406.230b48","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.wled","data":"\"{{msg.data.attributes}}\"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":890,"y":1400,"wires":[["97e01587.e801d8"]],"inputLabels":["msg.data"]},{"id":"98f40a73.754b48","type":"server-state-changed","z":"583ad8e1.7bd1f8","name":"Garage Doors Group","server":"bf8f8406.230b48","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"group.garage_doors","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":160,"y":1300,"wires":[["c2489f41.8e4aa"]]},{"id":"652aab2f.868504","type":"inject","z":"583ad8e1.7bd1f8","name":"open","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"open","payloadType":"str","x":290,"y":1240,"wires":[["c2489f41.8e4aa"]]},{"id":"c7077d.8ad0c88","type":"inject","z":"583ad8e1.7bd1f8","name":"closed","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"closed","payloadType":"str","x":290,"y":1380,"wires":[["c2489f41.8e4aa"]]},{"id":"a2fca8b3.279828","type":"change","z":"583ad8e1.7bd1f8","name":"set msg.data to flow.data","rules":[{"t":"set","p":"data","pt":"msg","to":"data","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":1400,"wires":[["2350c89b.370688"]]},{"id":"7480ee41.862a","type":"api-current-state","z":"583ad8e1.7bd1f8","name":"","server":"bf8f8406.230b48","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.wled","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":660,"y":1200,"wires":[["ac5ba275.bdbb8"]]},{"id":"97e01587.e801d8","type":"debug","z":"583ad8e1.7bd1f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"data.attributes","targetType":"msg","statusVal":"","statusType":"auto","x":1190,"y":1400,"wires":[]},{"id":"ac5ba275.bdbb8","type":"change","z":"583ad8e1.7bd1f8","name":"","rules":[{"t":"set","p":"data","pt":"flow","to":"data","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":1200,"wires":[[]]},{"id":"2576530e.33b8ac","type":"debug","z":"583ad8e1.7bd1f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1090,"y":1200,"wires":[]},{"id":"bf8f8406.230b48","type":"server","name":"Home Assistant","legacy":false,"addon":false,"rejectUnauthorizedCerts":false,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]