Hello all,
Probably another real noob question, but I’ve been working on a flow for a few days and can’t get it done.
I made a very simple flow: when motion is detected outside, I want the light under the carport to turn on and off after 30 seconds. Somehow it doesn’t work. The sensor detects motion and turns on the light carport, then nothing happens. The lamp stays on continuously.
I have also used the same flow in other places in my house and there it works fine, just not here and I do not know what is wrong.
Here is the flow:
Here are the settings of my ‘events-state’.
Here the setting: of the switch.
Why does this flow not work? Hope someone will shed some light on it.
Johan
Edit: Here is the code of my flow
[{"id":"615fe651fd6e3ca8","type":"tab","label":"Test","disabled":false,"info":"","env":[]},{"id":"275deb0aa0b68851","type":"server-state-changed","z":"615fe651fd6e3ca8","name":"Sensor carport","server":"aacf422.35ac2c","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.0x00158d00047b8551_illuminance","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"30","forType":"num","forUnits":"seconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":100,"wires":[["e1b9501ec1d2999f"],["04f787fe2895fdb6"]]},{"id":"04f787fe2895fdb6","type":"api-call-service","z":"615fe651fd6e3ca8","name":"Lamp carport - aan","server":"aacf422.35ac2c","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.shelly1_b8bdd2"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":400,"y":160,"wires":[[]]},{"id":"e1b9501ec1d2999f","type":"api-call-service","z":"615fe651fd6e3ca8","name":"Lamp carport- uit","server":"aacf422.35ac2c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.shelly1_b8bdd2"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":400,"y":40,"wires":[["c5bbb4667271a7ba"]]},{"id":"8d5ef902c3a64e76","type":"inject","z":"615fe651fd6e3ca8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":200,"wires":[["e1b9501ec1d2999f"]]},{"id":"c5bbb4667271a7ba","type":"debug","z":"615fe651fd6e3ca8","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":600,"y":40,"wires":[]},{"id":"aacf422.35ac2c","type":"server","name":"Home Assistant","addon":true}]