Hello,
I’m new to the HA platform, another refugee from the decommissioning of the SmartThings V1 platform.
While I could just put the actions directly in an automation that’s enabling my AC at a particular time, I thought it might be useful to de-couple the actions that happen from state changes so that I wouldn’t have to maintain the same actions across multiple other automations. So the basic one I am trying to get going now would turn a switch on that would cause a fan to come on, when my Ecobee is set to enable the cool mode. I also am trying to get a corresponding one that would shut off that switch when the Ecobee mode is set to off.
Initially, the “on” action, seemed to work, but now it is not. I’m not clear why. Reading forum posts I suspect perhaps the cloud aspect to the Ecobee API might be part of it, so perhaps configuring my thermostat as a HomeKit device would help with that? I’m not quite sure yet where addressing it as HomeKit vs the native API would be better.
And a related problem, the off action I have not been able to get to fire, but I noticed in looking at mode values in the entity, 3 of the 4 values are not quoted, but the last value (off) is in single quotes. I wondered if that means I have to put it into the trigger config differently (match the quoting?). I am only using the GUI to generate the automations so far, because I am new to the platform. I have extensive coding background though, and am ok with YAML, so if adding some logic will work better here, that’s fine, I just haven’t learned the syntax for doing so. This is the definition for the “on” trigger right now:
- id: '1623428046907'
alias: Auto-On with AC
description: turns things on if the AC mode is enabled(ecobee set to cool)
trigger:
- platform: state
entity_id: climate.main_floor
attribute: hvac_modes
to: cool
condition: []
action:
- type: turn_on
device_id: 39b22686bc4032bd05a41dffe8e68a7e
entity_id: switch.wood_stove_69f
domain: switch
mode: single
Summerizing current issues: On state change trigger seems to not be firing, or firing inconsistantly. Off state seems to not fire at all, or is firing too often(immediately after On) or not at all (the question about the state in the dev tools showing the mode value for off, as being single quoted, but no other options are).
I am running the install ona Raspberry PI, versions are:
core-2021.6.3
supervisor-2021.05.4
Hopefully that made sense! Thank you for any assistance!
Edit: I thought I should elaborate a bit more on the mode values. The dev tools shows the values of the state attributes for hvac_modes this way:
hvac_modes:
- heat_cool
- heat
- cool
- 'off'
So I’m not clear in the YAML for a state trigger checking if the state goes to off if it would be:
to: 'off'
or
to: off
or if it doesn’t matter. Since the one isn’t like the others, I wondered if this was significant(and I’m having trouble getting it to fire either way so far) Thanks!