Hello everybody,
I use Home Assistant for a longer time now but I’m totally new to Node-Red.
I want to build an automation (that is working in HA) in Node-Red.
- Turn on light when my Mobile Phone or my girlfriends Phone are registered in our Wifi-Network (state from “not_home” to “home”) and when my brightness sensor is lower than a specific value.
This works totally fine in HA.
I tried by using the “Trigger:state”-Node with the condition “previous state: not_home” to detect our phones. This is working so far.
I combined these to states with a “Boolean Logic” as “OR”-condition.
Behind this logoc the brightness sensor is connected with a “Boolean Logic” as “AND”-condition.
This also works great.
The Problem is that the brightness sensor refreshes every minute. So the automation to turn on the light also gets triggerd every minute because the “Boolean logic” save the state of the Phones and the brightness sensor trigger with “true” every minute.
But this should only be triggerd once because if I turn off the light manually it should not be turned on by the automation (only if the state of our phones change from “not_home” to “home”.
Can I reset the Boolean logic after every trigger oder can I trigger the brightness sensor only when the condition “lower than xx lux” is fulfilled?
Can anybody help me?
Regards,
Daniel