Currently my thermostat can only set the temperature when it is in heat or cool mode. That means to use the voice assistant I have to say 2 sentences if the thermostat is off. The first to select the mode I want (heat/cool) and another to set the temperature.
I would like to just say “Set the temperature to 22 degrees” and then have the automation recognize the asked for temp (wildcard), compare it with the current temp of the thermostat and turn on either heat (if the asked for temp is higher) or cool and then set the temp of the thermostat.
I started with my automation but I’m sure I’m missing some pieces. I get an error when trying to save the automation like this.
alias: Voice command set thermostat
description: "Compares current temperature to asked for temp and sets temp and HVAC mode appropriately"
triggers:
- trigger: conversation
command: Set thermostat to {temperature} degrees
conditions:
- condition: numeric_state
entity_id: climate.my_thermostat
attribute: current_temperature
below:
"{{trigger.slots.temperature}}"
actions:
- device_id: 4cb912af675e56cc46476d1205eb6c0f
domain: climate
entity_id: b236a3b5df5bfb43f4021a9d6586d73f
type: set_hvac_mode
hvac_mode: heat
- action: climate.set_temperature
metadata: {}
data:
temperature:
"{{trigger.slots.temperature}}"
target:
device_id: 4cb912af675e56cc46476d1205eb6c0f
mode: single