can some one explain me why my automation doesn’t work.
he is executing the action everytime when i click run.
when i change the state he is doing nothing.
To make it easier for us to understand the structure and function of your automation share the YAML instead of screenshots. To do that click on the three-dot menu at the top right of the automation editor, select “Edit in YAML”, then paste the contents to the thread adding 3 backticks (```) before and after the code block.
alias: test
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.epex_spot_at_price
attribute: price_ct_per_kwh
below: 17
above: 16
condition: []
action:
- device_id: 55049c41c2d136d0697de4ef45f5c3a7
domain: select
entity_id: 5ffb4e9d7a81c9630d947c4bdb4e6258
type: select_option
option: Neutral
mode: single
The Run button executes the action block, completely skipping the trigger and conditions.
For your trigger to fire, the sensor’s value must change from either above 17 or below 16 to a value between 16 and 17. You can test your trigger by manually setting the state using the State tool in the Developer Tools menu.
oh i didn’T know that… i thought he is running everything
should it work when i set the status to the needed value?
alias: test
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.epex_spot_at_price
attribute: price_ct_per_kwh
below: 120
condition: []
action:
- device_id: 55049c41c2d136d0697de4ef45f5c3a7
domain: select
entity_id: 5ffb4e9d7a81c9630d947c4bdb4e6258
type: select_option
option: Neutral
mode: single
because he is doing nothing
Your trigger looks fine, remember when testing it manually that you must first change the value so that it’s outside your target… In the second example that would mean setting it above 120. Then set the value to be within your target, i.e. below 120.
nothing changed…
i also waited for 10 o’clock because it changed to 90 and nothing happend.
i tested it with condition as well and it’s flashing green …
Post the debug trace.
When sharing Traces, download then copy/paste the trace json object so we can access all the data without you having to post 20 different screenshots.
i solved it like that and this works fine :).
alias: Auto-laden wenn Strom billig
description: ""
trigger:
- platform: time_pattern
hours: /1
seconds: "2"
condition:
- condition: numeric_state
entity_id: sensor.epex_spot_at_price
below: 1
attribute: price_ct_per_kwh
action:
- device_id: 55049c41c2d136d0697de4ef45f5c3a7
domain: select
entity_id: 5ffb4e9d7a81c9630d947c4bdb4e6258
type: select_option
option: Neutral
mode: single