Automations not triggering anymore!

Hi All,

For some reason , my automations are not triggering anymore. I have deleted them and recreated them but still no luck. If I manually run them they work fine.

I have setup 2 so far, to turn on/off the heating when the room gets to set temperature’s.

alias: Hallway Heating On
description: ''
trigger:
  - platform: numeric_state
    entity_id: sensor.wirelesstag_hallway_tag_temperature
    below: '17'
    attribute: unit_of_measurement
condition: []
action:
  - type: turn_on
    device_id: ***********************ff9402
    entity_id: switch.hallway_heating_socket_1
    domain: switch
mode: single

alias: Hallway Heating Off
description: ''
trigger:
  - platform: numeric_state
    entity_id: sensor.wirelesstag_hallway_tag_temperature
    above: '18.5'
condition: []
action:
  - type: turn_off
    device_id: *************************f9402
    entity_id: switch.hallway_heating_socket_1
    domain: switch
mode: single

I am using Home Assistant 2021.12.2 on a Pi

The room tags are working and showing the temperature’s correctly. I am at a loss!!

Can someone help please? :laughing:!

why is your

> attribute: unit_of_measurement

shouldn’t that be temperature or nothing?

please format you stuff easyer for us to fix

why just use HA Climate

Sorry for the poor format, i have just formatted it correctly…

It all used to work, it just randomly stopped

I can’t see why the off automation isn’t working but the on automation can’t work since it’s looking at the “unit_of_measurement” attribute (which isn’t a number) and triggering it when that attribute becomes less than 17. Which it can’t ever because it’s not a number.

The off automation will only ever trigger if the temp goes from below 18.5 to above 18.5. If it never crosses the threshold it will never trigger.

If none of your automations trigger, it means the Automation integration wasn’t loaded. That can happen if you made an invalid modification to an automation and then executed Reload Automations.

If it’s only the one automation above that fails to work then the problem is the attribute option. You claim it used to work but attribute: unit_of_measurement means the Numeric State Trigger will trigger when the value of the unit_of_measurement decreases below 17. The unit_of_measurement is not numeric so it’s implausible this ever worked (and explains why it doesn’t work now). Remove it.