Trying to make a template using greater than concept to allow a condition to wait for 5 minutes to allow to trigger and tried the below with no sucess so I tried a sensor but the sensor is not changing states to on when above 70
but that doesn’t seem to work so I was trying to make a sensor to recognize if the sensor.bathroom_multi_sensor_luminance was over 70 to turn to on and tried to do
Here is the on/off sensor:
platform: template
sensors:
bathroom_main_light:
friendly_name: “Bathroom Main Light”
value_template: >-
{% if is_state(‘sensor.bathroom_multi_sensor_luminance.state’, ‘float > 70’) %}
on
{% else %}
off
{% endif %}
{% if (states.sensor.bathroom_multi_sensor_luminance.state|float > 70) %}
on
{% else %}
off
{% endif %}
might do the trick, it will evaluate to on or off, you can check out this in the dev-tools-> templates, just paste it in or goto ip:8123/dev-template and paste it in
I don’t understand why your first automation would need to be a template. To be honest I don’t really understand templates yet… wouldn’t the below work?
for: is only allowed on triggers for now, not in conditions.
Maybe you can turn on an input_boolean with another automation and check that on your first automation condition.
So far this looks to work. I will let you know tomorrow as the automation is if the shower/bathroom main light is on to trigger my Heater in bedroom to turn on 5 min after so by the time I’m out it is warm…On a side note I run my fan at night and conveniently my fan power off is the same toggle command as my heater power on so the goal is by the time Im in the shower the fan is off and the heater is on!