Automation above and below value not firing

Evening all, me again. Sorry I thought this one would be a really simple one but for some reason by automation is not nut firing. If I fire it manually via configuration it’s actions are carried out perfectly but when left to fire automatically it never gets hit and I can see that from the last run time.

I have an input_number and I want to fire one routine when the number hits 0 and another one when its above 0

Here is the code I have:


- id: "1632849891989"
  alias: New Ticket Flag On
  description: "When unassigned tickets is above 0 turn the new ticket flag on"
  trigger:
    - platform: numeric_state
      entity_id: input_number.new_open
      above: "0"
  action:
    - service: input_boolean.turn_on
      target:
        entity_id: input_boolean.new_tickets
  mode: single

- id: "1632849891990"
  alias: New Ticket Flag Off
  description: "When unassigned ticket count hits 0 turn the new ticket flag off"
  trigger:
    - platform: numeric_state
      entity_id: input_number.new_open
      below: "1"
  action:
    - service: input_boolean.turn_off
      target:
        entity_id: input_boolean.new_tickets
  mode: single

I have tried using the developer tools to set the state of input_number.new_open to 0, 1, 2 and 999 and it doesn’t trigger any of those automations…

Am I being stupid?

Everything looks OK at a glance.
Was the YAML generated from the UI or by yourself manually ?
If the latter, are all the entity_id's correct ?

Have you checked the developer tools / states page to see that the state of your input_number is actually changing from below to above one or vice versa ?

I’ve made a similar automation using entities I already had and it works as expected.

- id: '1632851282014'
  alias: Test for Max
  description: ''
  trigger:
  - platform: numeric_state
    entity_id: input_number.water_timer
    above: '0'
    id: turn switch on
  - platform: numeric_state
    entity_id: input_number.water_timer
    id: turn switch off
    below: '1'
  condition: []
  action:
  - choose:
    - conditions:
      - condition: trigger
        id: turn switch on
      sequence:
      - service: switch.turn_on
        target:
          entity_id: switch.hw_relay
    - conditions:
      - condition: trigger
        id: turn switch off
      sequence:
      - service: switch.turn_off
        target:
          entity_id: switch.hw_relay
    default: []
  mode: single

When you did that test did you make sure to go 0, 1, 0, 2, 0, 999 so that you would actually capture the triggering state change?

Ok maybe I have just been staring at this for too long but I have come home from work and using the developer tools to set value again it is now working but I swear it wasn’t!

@123 It appears to be working fine from 0 to 1