I’m trying to write my first automation to setback my thermostat at night. I used input variables for the manual setpoints. The thermostat is a z-wave by Trane. I have it working (zwave beta) and I can set the temperature in the HASS UI using Developer Tools | Services and a constant for the temp. When I try it in my automation, it doesn’t complain but it does nothing.
Note if I change the “temperature:” pair to “temperature: 18” it still does nothing.
Also, if you could help me with the template syntax. The editor put in all the quotes and escapes and I don’t know why I often see syntax in samples like “temperature: >” (specifically the ‘>’). And why do I need the entity_id twice (under action and also under data_template)?
In Developer Tools | Services, I use:
Service – climate.set_temperature
Entity – climate.thermostat_mode
Service data
1 entity_id: climate.thermostat_mode
2 temperature: 18
Well, not sure. When I zwave included the thermostat, zwave (beta) made one device with two entities. The first entity is the room temperature and the second one is just about everything else (mode, setpoint, fan mode…) by using attributes, though the actual state itself is the mode (heat, cool, heat_cool or off). Bit odd but it displayed correctly.
So I’ve wondered about that. The only thing is that if I go to Developer Tools | Services and choose
Service -> climate.set_temperature
Entity -> climate.thermostat_mode
Service Data ->
1 temperature : 25
2 entity_id: climate.thermostat_mode
it works. Kinda implies it is the right entity_id.
Finally, I really don’t quite understand “climate”. It seems to be a collection of all climate device types (of which my thermostat is one). If that is the case, shouldn’t I be using the thermostat’s mode entity_id instead of the climate’s mode entity_id? Still, it works from Developer Tools so ???
I renamed the thermostat device (and entities) from “Thermostat” to “Living Room Thermostat” for future expansion and to see if the climate entity changed (it did).
I didn’t need the entity_id in the service key as long as it was in the data_template key
Pretty sure I don’t need the “float” filter as it coerces it into a float
Time to add more to the logic now that I have my first automation working!
Many thanks for your help, @tom_l. Together we got it working.