Automation with a trigger on a change of a numerical value?

I thought it would be simple, but I am lost now… ;-).

I want to trigger an automation on the change of a numerical value of a device. It is a value that changes a few times per month.
But I cannot find how to do it. All triggers only seem to work when a numerical value is above of below a certain value.
I am missing something that would trigger a change of a numerical value?

For your info: it is this device: Wi-Fi P1 Meter (HWE-P1) from this integration: https://www.home-assistant.io/integrations/homewizard

Just use a normal state trigger, not numeric state. It will trigger on any change to any value (unless you tell it not to).

1 Like

e.g.

This will trigger on all changes from one valid state to another:

triggers:
  - trigger: state
    entity_id: sensor.foobar
    not_to:
      - unknown
      - unavailable
    not_from:
      - unknown
      - unavailable

This will trigger on all changes including to/from unavailable/unknown and changes to the sensor’s attributes:

triggers:
  - trigger: state
    entity_id: sensor.foobar

This will trigger on all changes including to/from unavailable/unknown but ignore attribute changes:

triggers:
  - trigger: state
    entity_id: sensor.foobar
    to: ~
1 Like

OK: my ‘issue’ was on a numerical value. I was expecting the numerical entities would only work ‘as numerical’ entities…: I learned from the feedback from @Mayhem_SWE the also work on the ‘state’ related triggers.