Help Needed with Combining Automations - Thermostat Automation

Instead of ’ entity_id: group.trackers’, can I use:

    entities:
      - device_tracker.life360_me
      - device_tracker.life360_wife

or maybe this would be better if I set up groups like above and set it to:

  - entity_id: group.parents
    platform: state
    to: not_home

Instead of ’ entity_id: group.trackers’, can I use:

No. Triggers are OR logic. So if you or your wife left home the heating would turn off.

The group trigger only fires if you are both away.

The problem is that I have some trackers setup in HA whom I don’t want to be part of this automation. I have set up a parents group, with just me and my wife, so would this work?

  - entity_id: group.parents
    platform: state
    to: not_home

Sure. As long as you don’t mind the heating going off with the kids home.

You can also change the on automation to:

alias: Thermostat on
  trigger:
  - platform: time
    at: '06:30:00'
  - platform: time
    at: '12:30:00'
  - platform: time
    at: '17:30:00'
  - platform: state
    entity_id: group.parents
    to: 'home'
  condition:
  - condition: state
      entity_id: group.parents
      state: 'home'
  - condition: or
    conditions:
    - condtion: time
      after: '06:30:00'
      before: '10:00:00'
    - condtion: time
      after: '12:30:00'
      before: '14:00:00'
    - condtion: time
      after: '17:00:00'
      before: '23:00:00'
  action:
  - service: climate.turn_on
    entity_id: ?
1 Like

Groups certainly tidy things up a little and I like the idea of being able to have different groups. In this instance, it would be simple to change from parent, to family etc.

I’m still learning yaml but learn a bit extra every day and today I have learnt loads thanks to you. Very much appreciated.

1 Like

Remember asking about not supplying an entity id?

Breaking change coming up:

Thanks for the heads-up. I will look at my configuration this afternoon and add and entry-id - no doubt I’ll break it and will back on here asking what I did wrong :slight_smile:

This is my climate entry. Do I just need to add ‘thermostat’ to the entry_id in the automation?

climate:
  - platform: generic_thermostat
    name: "Thermostat"
    heater: switch.lounge_heater
    target_sensor: sensor.average_temp
    min_temp: 10
    max_temp: 24
    ac_mode: false
    #target_temp: 18
    cold_tolerance: 0.2
    hot_tolerance: 0.1
    precision: 0.1
    keep_alive:
      minutes: 3    
    away_temp: 11

Looking at that it should be entity_id: climate.thermostat

But have a look in the developer tools states menu to be sure.

1 Like

Yes, that’sit, thanks.

Thanks to all the help here, the thermostat is now working very well and I have a warmer house when it is required, but likely spending less, as it’s not on when no one is home.

I’ve discovered that I can turn the heating on using Alexa, because I have hue emulation enabled in Tasmota; however, the status is not reflected on the thermostat card in Lovelace UI i,e, I say ‘Alexa, turn on heating’, it comes on but the thermostat card shows as it being off. Is this something I can fix? Here’s the relevant pieces of yaml. “Lounge Heater” is the boiler switch controlled by climate and is is also the switch that Alexa is operating. I think Alexa reactions to ‘turn on heating’ as heating is the friendly name set in Tasmota

  - platform: mqtt
    name: "Lounge Heater"
    command_topic: "cmnd/boiler/power"
    state_topic: "stat/boiler/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
    
climate:
  - platform: generic_thermostat
    name: "Thermostat"
    heater: switch.lounge_heater
    target_sensor: sensor.average_temp
    min_temp: 10
    max_temp: 24
    ac_mode: false
    #target_temp: 18
    cold_tolerance: 0.2
    hot_tolerance: 0.1
    precision: 0.1
    keep_alive:
      minutes: 3    
    away_temp: 11