Hi everyone,
I have a trigger state node for a motion sensor that I can’t figure out. It’s taking in lux as a number. I think I need a set msg.payload before the trigger state?
The lux-only on flow works perfectly. I want this flow to turn off the room if the lux gets above the threshold and not turn the room on at all if there’s no occupancy.
[{"id":"b1a17bc8.bc2618","type":"tab","label":"Living Room","disabled":false,"info":""},{"id":"87739f86.c1df4","type":"eztimer","z":"b1a17bc8.bc2618","name":"Weekends","debug":true,"autoname":"goldenHour - 23:00:00","tag":"eztimer","topic":"","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"haZone","latLongHaZone":"zone.home","lat":"30.003590996565503","lon":"-90.06227874742763","timerType":"1","startupMessage":false,"ontype":"1","ontimesun":"goldenHour","ontimetod":"17:00","onpropertytype":"msg","onproperty":"payload","onvaluetype":"bool","onvalue":"true","onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"23:00:00","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"bool","offvalue":"false","offoffset":"20","offrandomoffset":true,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":false,"tue":false,"wed":false,"thu":false,"fri":true,"sat":true,"sun":false,"x":730,"y":40,"wires":[["70796b39.6c2624"]]},{"id":"c2154d39.f17ee","type":"eztimer","z":"b1a17bc8.bc2618","name":"Weeknights","debug":false,"autoname":"goldenHour - 22:00:00","tag":"eztimer","topic":"","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"haZone","latLongHaZone":"zone.home","lat":"30.003590996565503","lon":"-90.06227874742763","timerType":"1","startupMessage":false,"ontype":"1","ontimesun":"goldenHour","ontimetod":"17:00","onpropertytype":"msg","onproperty":"payload","onvaluetype":"bool","onvalue":"true","onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"22:00:00","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"bool","offvalue":"false","offoffset":"20","offrandomoffset":true,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":true,"tue":true,"wed":true,"thu":true,"fri":false,"sat":false,"sun":true,"x":630,"y":360,"wires":[["70796b39.6c2624"]]},{"id":"70796b39.6c2624","type":"hue-group","z":"b1a17bc8.bc2618","name":"Living Room","bridge":"3337ddab.5355c2","groupid":"1","colornamer":true,"skipevents":false,"universalevents":false,"x":850,"y":200,"wires":[[]]},{"id":"33c98281.81bf0e","type":"poll-state","z":"b1a17bc8.bc2618","name":"Poll Lux Below 40","server":"1952aa83.c9e0e5","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"120","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":true,"entity_id":"sensor.philips_sml001_546a1509_illuminance","state_type":"num","halt_if":"40","halt_if_type":"num","halt_if_compare":"lt","outputs":2,"x":90,"y":60,"wires":[["04b2bdf53688aae9"],[]]},{"id":"51e15269.8a2cfc","type":"time-range-switch","z":"b1a17bc8.bc2618","name":"daytime only turn on","lat":"30.00369","lon":"-90.06115","startTime":"07:00","endTime":"goldenHour","startOffset":0,"endOffset":0,"x":380,"y":220,"wires":[["d4037b84.824e08"],[]]},{"id":"d4037b84.824e08","type":"change","z":"b1a17bc8.bc2618","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":200,"wires":[["70796b39.6c2624"]]},{"id":"04b2bdf53688aae9","type":"trigger-state","z":"b1a17bc8.bc2618","name":"Living Room Occupancy","server":"1952aa83.c9e0e5","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"binary_sensor.living_room_occupancy","entityidfiltertype":"exact","debugenabled":true,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"previous_state","comparatorType":"is_not","comparatorValueDatatype":"str","comparatorValue":"on","propertyValue":"old_state.state"},{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on","propertyValue":"new_state.state"}],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":150,"y":160,"wires":[["51e15269.8a2cfc"],["e3784291c3ee3a60"]]},{"id":"d992c387da8191da","type":"change","z":"b1a17bc8.bc2618","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":100,"wires":[["70796b39.6c2624"]]},{"id":"e3784291c3ee3a60","type":"time-range-switch","z":"b1a17bc8.bc2618","name":"daytime only turn on","lat":"30.00369","lon":"-90.06115","startTime":"07:00","endTime":"goldenHour","startOffset":0,"endOffset":0,"x":460,"y":100,"wires":[["d992c387da8191da"],[]]},{"id":"3337ddab.5355c2","type":"hue-bridge","name":"Slark Home","bridge":"192.168.1.2","key":"VkzjmjDAj3l0dtDbEj49Lz17trUajfU9rqnBJIZJ","interval":"3000","disableupdates":false},{"id":"1952aa83.c9e0e5","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open|1","connectionDelay":true,"cacheJson":true}]