Hello guys,
sorry for the newbie question: I tried to search documentation everywhere but couldn’t find a solution that fits.
What I want to do
I need a binary sensor that works like this:
- state is OFF when value is less than 600
- state doesn’t change when the value is between 600 and 1150 (if it was ON, it has to remain ON, if it was OFF it has to remain OFF)
- state is ON when the value is higher than 1150
Why
I want to monitor the CO2 in my house and I want HA to:
- send a voice message asking to open the windows if the CO2 is higher than 1150
- send a voice message saying we can close the windows if the CO2 is lower than 600, BUT ONLY if a message asking to open the windows was already sent (i.e. CO2 has been higher than 1150)
Example:
T1 - CO2: 400 => state: off
T2 - CO2: 800 => state: off // CO2 between 600 and 1150: no changes to the state
T3 - CO2: 1200 => state: on // CO2 too high: change the state to `ON`
T4 - CO2: 800 => state: on // CO2 between 600 and 1150: no changes to the state
T5 - CO2: 550 => state: off // CO2 below 600, change the state to off
Is there any way to create such sensor?
Is there any better way to achieve what I’m trying to do?
I really appreciate any help you can provide.
Massimiliano