Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 108841

Trigger automation if numeric_state increases (+1)

$
0
0

OK, this is such a simple usecase. Don´t laugh at me folks :grin:

I have one automation:

trigger:
  - platform: state
    entity_id: sensor.problems_any
    from: '0'
    for: '00:00:05'
    id: neu
action:
  - service: notify.all_devices
mode: single

Currently it triggers only once: when sensor value goes > 0.

:question::question::question: How to trigger the automation also, when the value is increased, doesn´t matter what it was before :question::question::question:

Example: sensor value is 18. If it wents up to 19 (or more), please trigger.

I thought bout adding this as additional trigger and adding the general condition:

  - platform: numeric_state
    entity_id: sensor.problems_any
    id: mehr
    above: '0'
    for: '00:00:05'
condition:
  - condition: template
    value_template: '{{ (trigger.to_state.state - trigger.from_state.state) > 1 }}'

Unfortunately, this doesn´t work (the automation still does not trigger when sensor value increases). It is such a simple usecase… makes me angry still not learning that language -.-

Ideas warmly welcome!

5 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 108841

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>