I am at a loss how to easily modify this - I found an edge case issue I’m not sure how to implement.
I want this to NOT run if sensor.downstairs_hvac_daily_cycle changes when vacation or severe_weather are “on”.
I still want it to trigger if any other existing trigger happens, including if daily_cycle changes while both vacation and severe_weather are off
Any ideas to easily add the condition to only the one trigger? Would a condition-template maybe do it testing trigger ID and also value of vacation/severe_weather?
- alias: "Downstairs HVAC Clear Manual Adj Value"
trigger:
# Trigger when programmed temp changes
- platform: state
entity_id:
- sensor.downstairs_hvac_daily_cycle
# Trigger if we go in/out of vacation or temp-hold modes
- platform: state
entity_id:
- input_boolean.downstairs_hvac_vacation_mode
- input_boolean.downstairs_hvac_severe_weather_mode
# Trigger if thermostat is turned off to on
- platform: state
entity_id: climate.downstairs_thermostat
from: 'off'
- platform: homeassistant
event: start
mode: queued
action:
- service: input_number.set_value
data:
entity_id: input_number.downstairs_hvac_manual_cool_adj
value: 0
- service: input_number.set_value
data:
entity_id: input_number.downstairs_hvac_manual_heat_adj
value: 0
- alias: "Downstairs HVAC Clear Manual Adj Value"
trigger:
# Trigger when programmed temp changes
- platform: state
entity_id:
- sensor.downstairs_hvac_daily_cycle
id: "cycle_trigger"
# Trigger if we go in/out of vacation or temp-hold modes
- platform: state
entity_id:
- input_boolean.downstairs_hvac_vacation_mode
- input_boolean.downstairs_hvac_severe_weather_mode
# Trigger if thermostat is turned off to on
- platform: state
entity_id: climate.downstairs_thermostat
from: 'off'
- platform: homeassistant
event: start
conditions:
- condition: template
value_template: >
{{
trigger.id|default(none) not in ['cycle_trigger']
or
not is_state('input_boolean.downstairs_hvac_vacation_mode', 'on')
and
not is_state('input_boolean.downstairs_hvac_severe_weather_mode', 'on')
}}
mode: queued
action:
- service: input_number.set_value
data:
entity_id: input_number.downstairs_hvac_manual_cool_adj
value: 0
- service: input_number.set_value