Simple (but important) automation works as expected, then stopped...but why?!

Hi there, this is my first post so go gentle. In short, I have a seemingly simple automation that was working and now doesnt appear to be doing what we need it to.

It is a simple if temp goes above value, turn off the dumb radiator switch. If it goes below a value, turn it on.

alias: "Nursery: Radiator mgmt"
description: ""
triggers:
  - type: temperature
    device_id: 8e425504de4cc30105da3995528f52e7
    entity_id: 6a173e408f178af88f79b1c83153d08c
    domain: sensor
    trigger: device
    above: 70
    id: Hot
    alias: Hot >70
  - type: temperature
    device_id: 8e425504de4cc30105da3995528f52e7
    entity_id: 6a173e408f178af88f79b1c83153d08c
    domain: sensor
    trigger: device
    id: Cold
    below: 68
    alias: Cold <68
conditions:
  - condition: state
    entity_id: sensor.house_occupancy
    state: occupied
    enabled: false
actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Cold
        sequence:
          - action: switch.turn_on
            target:
              device_id:
                - 99cb6383e5f3338fc7c8efc267815cff
            data: {}
          - data:
              message: Nursery radiator turned on (<68)
            action: notify.mobile_app_pixel_8_pro
          - data:
              message: Radiator Fail-Safe Automation Triggered
              title: "<68 Temperature Fail-Safe Automation Triggered "
            action: notify.mobile_app_jennifer__iphone_2
      - conditions:
          - condition: trigger
            id:
              - Hot
        sequence:
          - data: {}
            action: switch.turn_off
            target:
              device_id:
                - 99cb6383e5f3338fc7c8efc267815cff
          - data:
              message: Nursery radiator turned off  (>70)
            action: notify.mobile_app_pixel_8_pro
          - data:
              message: Radiator Fail-Safe Automation Triggered
              title: ">70 Temperature Fail-Safe Automation Triggered "
            action: notify.mobile_app_jennifer_iphone_2
mode: single 

I cannot for the life of me work out why it does and then does not work. The screenshot below shows the normal and bouncing temps in her room.

I’m sure I am missing something simple…I just cannot work it out!

Any troubleshooting advice would be greatly appreciated by me, wife and our baby! Thanks in advance

I suggest you consider using the Generic Thermostat integration instead of this automation.

It will create a climate entity that you can display with the Thermostat Card. Set it to the desired temperature and it takes care of the rest.

You can create a simple automation to turn the climate entity on/off based on occupancy, schedule, etc.

1 Like

The thermostat integration should work for you. If that’s not what you want, I’d start by removing the occupancy sensor condition. Maybe it’s not allowing the automation to run.

Thank you for this. I have added the integration and will monitor for the day. Appreciate it.

Yup, make sense. I actually disabled that condition with the similar idea of trying to simplify as much as possible.

I did some further digging and the change I made was adjusting the automation mode from Single to Restart. The rationale was I wondered if the automation was getting ‘stuck’ in a particular state, compounded by being in Single mode.

However, I have since disabled the entire automation, installed the generic thermostat integration, and will keep an eye on it.

I was up every hour looking at the temp last night in fear of cooking or freezing my daughter! I really hope the thermostat integration makes this simpler and easier.

Thank you both for your help, and I will keep this thread updated if outcomes that aren’t expected occur.

Happy Friday

1 Like

Hello Steve,

To help solve your mystery and for future you, the reason it stopped triggering is that all the circled points were above 70.
Triggers happen as events, not states, so it only triggers when it passes the set point, not just because it is beyond it.