Automation works in dev tools, not in yaml

Hello,

I have an automation that changes settings on my z-wave thermostat. When the temp gets below 69F, it changes to heat, and sets the target temp to 69F. When it is triggered it will change the hvac_mode, but not the temp. However if I execute it via the dev tools with Call Service (see below), it works fine. I am kind of at a loss for how to troubleshoot it next. Any ideas for what to check would be appreciated. Thanks!

- alias: 'Turn on heat'
  trigger:
    platform: template
    value_template: "{% if states.sensor.honeywell_th8320zw1000_touchscreen_thermostat_temperature.state | float < 69.0 %} true {% endif %}"
  action:
    - service: climate.set_temperature
      data:
        entity_id: climate.honeywell_th8320zw1000_touchscreen_thermostat_mode
        temperature: 69
    - service: climate.set_hvac_mode
      data:
        entity_id: climate.honeywell_th8320zw1000_touchscreen_thermostat_mode
        hvac_mode: heat

Screen Shot 2020-09-18 at 1.22.56 PM

Change the Template Trigger to:

    value_template: "{{ states('sensor.honeywell_th8320zw1000_touchscreen_thermostat_temperature') | float < 69.0 }}"
1 Like

Actually, that’s just a numeric state trigger, there’s no need for any templating at all.

    platform: numeric_state
    entity_id: sensor.honeywell_th8320zw1000_touchscreen_thermostat_temperature
    below: 69

Yes, the template will work, but it’s overly complicated for such a simple trigger.

2 Likes

Moreover, why is an automation monitoring a thermostat’s ambient temperature and then setting the thermostat’s target temperature and turning on heating. Seems to me a typical thermostat can do all that on its own.

3 Likes

It’s…my hobby?

1 Like

In case anyone comes here looking for answers, none of these fixed my issue and I am not sure what the problem was but breaking out the second service change into its own automation accomplished the goal.

Your hobby would benefit from an understanding of how a climate entity works. It would spare you the trouble of creating unnecessary automations. However, apparently nothing suggested helped so I imagine this latest suggestion won’t either. Good luck to you.

1 Like