Improved master bedroom fan scheduling

I've decided I like the fan at cooler temperatures than I thought I would, so timing needed adjusted so it doesn't come on TOO early on the slightly chillier nights.
This commit is contained in:
2023-03-05 20:47:12 -05:00
parent 3c94e7f6ad
commit d267e79a5a

View File

@ -405,11 +405,16 @@ script:
entity_id: input_datetime.master_bedroom_fan entity_id: input_datetime.master_bedroom_fan
data: data:
time: > time: >
{% set low = state_attr('sensor.current_forecast','overnight_low') | float %} {% set low = states('sensor.tonights_low_temp') | int %}
{% if low > 60 %} {% set high = states('sensor.todays_high_temp') | int %}
{% if low > 60 or is_state('input_boolean.hot_day','on') %}
22:30 22:30
{% else %} {% elif low <= 60 and low >= 50 %}
23:30
{% elif low >= states('input_number.master_bedroom_fan_threshold') | int and high > 50 %}
00:00 00:00
{% else %}
06:00
{% endif %} {% endif %}
- service: input_select.select_option - service: input_select.select_option
target: target: