Numeric_state not triggered in automation

I have this automation to turn off a plug when battery reaches value of 100, but it’s not triggered.

- id: Batteria_Carica
  alias: S20_batteria_carica
  mode: single
  trigger:
    - platform: numeric_state
      entity_id: sensor.sm_g780f_livello_della_batteria
      above: 100
      below: 100
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: group.presenze
        state: home
      - condition: time
        after: '00:30:00'
        before: '08:30:00'
  action:
    - service: switch.turn_off
      entity_id: switch.plug_158d0001f551eb
    - service: notify.mobile_app_sm_g780f
      data:
        message: Batteria S20 carica
        title: HomeAssistant
        data:
          ttl: 0
          priority: high   

I think it depends from the ‘above’ and below’ values but how to use numeric_state trigger when i want to use only one exact value (in this case 100) ?

Remove below: 100 and change above: 100 to above: 99. You could also try with state trigger to 100.

2 Likes

When will it ever go above 100???

above: 99
2 Likes

Yes i also was thinking to use state trigger and to 100 but was not so secure it works… Thanks (as always) for your hints…