Hi There,
i made a flow in node red that based on a consumption triggers.
in short when I fire the playstation on it will see the consumption of that smart plug en will close my blind and set some lights, when I turn it of the blind will open again.
the problem that I face is that when I manual close the blind after a few seconds the trigger will come in action because there is no consumption on that smart plug.
how can I get this to work that the trigger only fire’s when it as to be?
i don’t have a state of the blind because its always unknown. problem is know and already fixed in a dev branch but I run the normal version.
this the flow:
[{"id":"a30a9b8a.2815c8","type":"tab","label":"test","disabled":false,"info":""},{"id":"a605bf56.cff778","type":"mqtt in","z":"a30a9b8a.2815c8","name":"","topic":"zigbee2mqtt/tv wand plug","qos":"0","datatype":"auto","broker":"f38b3d6.b6612c","x":130,"y":80,"wires":[["5c4bf714.bf0568"]]},{"id":"5c4bf714.bf0568","type":"json","z":"a30a9b8a.2815c8","name":"","property":"payload","action":"","pretty":false,"x":310,"y":80,"wires":[["c21adff.4e360a"]]},{"id":"c21adff.4e360a","type":"change","z":"a30a9b8a.2815c8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.power","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":80,"wires":[["93425135.48555"]]},{"id":"d53a122c.03dcf8","type":"api-current-state","z":"a30a9b8a.2815c8","name":"","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"above_horizon","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sun.sun","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":780,"y":80,"wires":[["68bfe0dc.839658"],[]]},{"id":"93425135.48555","type":"switch","z":"a30a9b8a.2815c8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"160","vt":"str"},{"t":"lte","v":"80","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":610,"y":80,"wires":[["d53a122c.03dcf8"],["2887cd79.d442ea"]]},{"id":"68bfe0dc.839658","type":"api-call-service","z":"a30a9b8a.2815c8","name":"rolgordijn 3/4 dicht","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.rolgordijn_zithoek","data":"{ \"position\": 25 }","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":990,"y":80,"wires":[["6b1fc1ca.e391f"]]},{"id":"6b1fc1ca.e391f","type":"api-current-state","z":"a30a9b8a.2815c8","name":"","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.zithoek","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1240,"y":60,"wires":[["7124388.df947c8"],[]]},{"id":"6082a67a.50b4c8","type":"api-call-service","z":"a30a9b8a.2815c8","name":"Lampen aan 50%","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.zithoek","data":"{\"brightness_pct\":50,\"transition\":2}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1650,"y":100,"wires":[[]]},{"id":"7124388.df947c8","type":"delay","z":"a30a9b8a.2815c8","name":"","pauseType":"delay","timeout":"20","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1460,"y":60,"wires":[["6082a67a.50b4c8","3f137864.fa8be8"]]},{"id":"3f137864.fa8be8","type":"api-call-service","z":"a30a9b8a.2815c8","name":"Lamp bloom 100%","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.zithoek_5","data":"{\"brightness_pct\":100,\"transition\":2}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1530,"y":160,"wires":[[]]},{"id":"2887cd79.d442ea","type":"api-current-state","z":"a30a9b8a.2815c8","name":"","server":"a7811bea.26e4e8","version":1,"outputs":2,"halt_if":"above_horizon","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sun.sun","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":780,"y":160,"wires":[["234b573f.653bc"],[]]},{"id":"234b573f.653bc","type":"api-call-service","z":"a30a9b8a.2815c8","name":"rolgordijn open","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.rolgordijn_zithoek","data":"{ \"position\": 100 }","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1000,"y":160,"wires":[["37c757c0.16374"]]},{"id":"a20b049e.2affc8","type":"api-call-service","z":"a30a9b8a.2815c8","name":"","server":"a7811bea.26e4e8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.zithoek, light.eettafel","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1310,"y":220,"wires":[[]]},{"id":"37c757c0.16374","type":"delay","z":"a30a9b8a.2815c8","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1280,"y":160,"wires":[["a20b049e.2affc8"]]},{"id":"f38b3d6.b6612c","type":"mqtt-broker","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"a7811bea.26e4e8","type":"server","name":"Home Assistant","addon":true}]