Joe68
August 12, 2024, 4:50pm
1
Hi,
Best practice, do you think that there is a need to check the AC state as an automation trigger?
What I have today is:
trigger:
- platform: numeric_state
entity_id:
- zone.home
above: 0
- platform: template
value_template: "{{is_state('climate.midea_ac_1', 'off')}}"
- platform: time
at: "08:00:00"
enabled: true
- platform: numeric_state
entity_id:
- sensor.living_room_thermostat_temperature
above: 80
enabled: true
or should I just keep this as trigger
trigger:
- platform: numeric_state
entity_id:
- zone.home
above: 0
- platform: time
at: "08:00:00"
enabled: true
- platform: numeric_state
entity_id:
- sensor.living_room_thermostat_temperature
above: 22
enabled: true
and check ‘state’ as a condition
condition: template
value_template: "{{is_state('climate.midea_ac_1', 'off')}}"
Thank you
those are usually two very different things… so it depends on what you want.
add to the trigger if you want your actions to be run when the AC turns off
Add to conditions if you want the actions to run when the other triggers happen and the AC is already off.
It’s not about best practice. It’s about what behavior you want
Joe68
August 12, 2024, 5:10pm
3
@armedad
Thanks, I was thinking of the two ways but was unsure (newbie)… In my case it would be the latter.
well… welcome… if you’re a newbie and want a jump start i’d really recommend you look at some of the stuff here… don’t be daunted by the quantity. scan the titles then skim the ones under automation. a little bit of time on that will save you hours and hours later:
A collection of posts on how to perform common tasks and deal with common problems. This Guide is intended for those new to Home Assistant, those that are struggling for answers on some subjects, and those in troubleshooting mode. All of the Home...
Reading time: 5 mins 🕑
Likes: 117 ❤