Automation Trigger - Broken?

Dear all,

i am using Hass IO sucessfully since years. But currently I am getting completely lost because I dont understand why my Automations dont trigger anmore when I use numeric_state as plattform:

My Automation looks like the following:

alias: Wechselkurs_Alarm
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.exchange_rate
    value_template: "{{ (states('sensor.exchange_rate' )) }} "
    above: 0.3
condition: []
action:
  - data_template:
      message: >-
        Der aktuelle EUR / Pfund Wechselkurs ist {{ 1/ (float
        (states('sensor.exchange_rate' ))) }} 
      title: Wechselkurs EUR/GBP
      target: iPhone
    service: notify.pushover
mode: single

Unfortunately, the trigger never executes. The Automation is on, an the template editor shows:

Template Editor:
{{ (states(‘sensor.exchange_rate’ )) }}

Ergebnistyp: number
0.864

and 0.864 is in my understanding above 0.3 Why does the automation not trigger? If I execute the automation manually the message is correclty delivered via pushover, so there is not the mistake. Like said, the Automation does not trigger :frowning:

Thanks so much for your HELP

So this will only trigger when it passes 0.3
Did you check if the value goes below and then past?

Hi

No the value never went under 0.3.

Actually the value is the currency exchange rate EUR/GBP, which is currently 0.864, means 1 EUR is 0.864 pounds.

What I want to achieve is that the automation is triggered for example when the value is 0.7 in order to monitor a good exchange rate for me.

How do I do this?

Have you tried using a different trigger? Time pattern, perhaps. You could have it fire every 10 minutes (for example - I don’t know how often your exchange rate sensor is updated) with a condition so that the notification is sent if the sensor value is above 0.x.

Also that line in your trigger is completely unnecessary. Remove it.

The trigger will obtain the state from the provided entity id:

trigger:
  - platform: numeric_state
    entity_id: sensor.exchange_rate
    above: 0.3
1 Like

Use a state trigger without providing a state for the trigger, and check if it’s above 0.3 in the condition.

BTW, why do you check on 0.3 anyway?

1 Like

Perfect! This worked