Automations not triggering for glances

I have glances configured on a server and i have it feeding information to home assistant. This works great. I would like to configure an automation to trigger an action when disk usage is above a certain threshold. Below is the automation i have and it never triggers. The disk usage percentage is at 68% and i set the threshold to 50 to see if it will trigger when i enable the automation and it doesn’t. what am i doing wrong?

alias: Disk Usage Alert
description: ''
trigger:
  - platform: numeric_state
    entity_id: sensor.glances_used_percent
    above: '50'
condition: []
action:
  - type: turn_on
    device_id: 1616cbadf8514b8f5f861a44e3db66ca
    entity_id: switch.office_plug
    domain: switch
mode: single
max: 10

It won’t because the value (disk usage percentage) must increase and cross the threshold to cause the Numeric State Trigger to trigger.

After crossing the threshold, and initiating a trigger, no further triggering occurs. The value must first decrease below the threshold, then rise above it to initiate another trigger.

1 Like