Help with automation trigger

Hey Guys,

I did some basic SNMP integration with an APC UPS and am pulling in the UPS state… Online, On Battery, (About 7 other states)…

I created a trigger to send me a push notification when incoming voltage drops below 110VAC… I’d like to do a similar when voltage returns to a normal state… but the challenge is… normal voltage is between 118-123 VAC… So how do I write my rule… If I say Trigger state > 117… it will happen on minor fluctuations…

I’d almost like to say when state is >117 but its previous state was less…

Not sure if this makes sense but basically want to send a alert when power drops and comes back…

You can add hysteresis with the threshold sensor:

binary_sensor:
  - platform: threshold
    entity_id: sensor.ac_voltage
    lower: 117
    hysteresis: 7

This sensor will be on at 110V and below, and off at 117V and above.

1 Like