great! No more error, but for some reason the setpoint on the device isn’t changing via the script execution. It does change if set manually via home assistant.
Ah I see, so it works now?
I’m not too familiar with how climate devices are used in Home Assistant, so the state is ‘on’ or ‘off’ and you want to check for the hvac_mode as well?
On or off would be fine, but I’m not sure if there is a attribute for just on off. There is for HVAC mode. Here is what I have that is not true and not allowing the script to fire.
alias: rack adjust ac setpoint
sequence:
- condition: state
entity_id: climate.equipment_closet
attribute: hvac_modes
state: cool
- service: climate.set_temperature
data:
entity_id: climate.equipment_closet
temperature: '{{ states(''sensor.wirelesstag_rack_upper_tag_temperature'') }}'
mode: single
Changing the attribute to hvac_mode might do the trick. (remove the ‘s’)
Reading through the docs, hvac_mode can be off as well, so that might be what you’re looking for
Hm, what’s the state of climate.equipment_closet?
As far as I understand it you want the script to only work when the unit is on, right?
So my assumption is that your A/C turns on when you set a temperature even though it remains off? (The docs say it should keep it’s current state)
Alright, what does the ‘state’ field say above the huge textbox?
You could try grabbing the hvac_mode from the template UI maybe? (Developer Tools - Template) {{ state_attr('climate.equipment_closet', 'hvac_mode') }}
But it may be that your integration doesn’t support getting this