Using the Accuweather Weather services to Change Thermostat Behavior

Hi Everyone,

I want to swap the thermostat state when the weather drops below a certain point - or goes above a certain point.

I created an automation that I thought would work:

alias: Nest - Living Room - Swap Cool to Heat
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.austin_weather_realfeel_temperature
    attribute: temperature
    below: 60
    enabled: true
  - platform: device
    type: turned_off
    device_id: 21df3e0ce564c808c062f2c61bfb8555
    entity_id: 4cf0df42d3703a2ef045aba078f3ace7
    domain: switch
    enabled: false
condition:
  - condition: device
    device_id: 68a8670c239a78168620c3a61deee72e
    domain: climate
    entity_id: climate.living_room
    type: is_hvac_mode
    hvac_mode: cool
  - condition: not
    conditions:
      - condition: device
        device_id: 68a8670c239a78168620c3a61deee72e
        domain: climate
        entity_id: 06ea420fc4396d34f4788d14bc6e32a1
        type: is_preset_mode
        preset_mode: eco
action:
  - device_id: 68a8670c239a78168620c3a61deee72e
    domain: climate
    entity_id: climate.living_room
    type: set_hvac_mode
    hvac_mode: heat
mode: single

This is my Automation YAML file (but I created it using the editor). I added a switch just to be able to test the triggering of it (that piece is disabled by default). It’s never worked, so I left it disabled.

Any ideas?

The other issue is the conditions. I can use the 3 dots to “Test” as follows:

And even when 1 fails - and the other passes, it still performs the automation (when I triggered it manually).

Any ideas?

What I am looking to do is flip the thermostat from Cool to Heat - if it’s not in Eco mode - based on the weather outside.

The main issue is your trigger. Unless you did something custom, your sensor does not have an attribute called temperature. Leave the attribute field empty so your trigger is monitoring the state of the sensor.

You need to clarify what you are saying. When you use the “Run” menu button or the automation.trigger action, the conditions are skipped.

I will give this a try and report back!

I didn’t know using “Run” button caused it to skip conditions.

Thanks Drew - this worked!

1 Like