Hi guys,
I created this automation but it doesn’t trigger at all.
I can’t figure why and maybe someone else will give me an solution/ideea.
alias: "Piscina: Anti-inghet piscina"
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.senzor_temperatura_ext_actual_temperature
below: 0
id: temperatura_este_sub_0_grade
value_template: ""
attribute: value_state
- platform: numeric_state
entity_id: sensor.senzor_temperatura_ext_actual_temperature
id: temperatura_este_peste_2_grade
above: 2
value_template: ""
attribute: value_state
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: temperatura_este_sub_0_grade
sequence:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.modul_curte_8_canale_pompa_filtrare_ch10
- switch.hmip_ps_000218a9abbcbe
- service: notify.mobile_app_s_galaxy_s22_ultra
data:
message: Risc de inghet, verifica piscina!
- conditions:
- condition: trigger
id: temperatura_este_peste_2_grade
sequence:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.modul_curte_8_canale_pompa_filtrare_ch10
- switch.hmip_ps_000218a9abbcbe
mode: restart
Rofo
(Ro)
February 5, 2023, 7:08pm
2
I think because thats one trigger, you’re asking it to fire when the temperature is both below zero AND above 2, which is impossible.
EDIT:- misread that… it is 2 triggers.
What does the entity history say?
Hellis81
(Hellis81)
February 5, 2023, 7:12pm
3
Cosmin.FRC:
attribute: value_state
Probably this that should be deleted.
Not sure but if you include an image of the sensor from developer tools then we can know for sure.
1 Like
This or something elese?
state_class: measurement
interface_id: RaspberryMatic-HmIP-RF
address: 0010DBE99234A5:1
model: HmIP-STHO-A
entity_type: generic
parameter: ACTUAL_TEMPERATURE
function: null
value_state: valid
unit_of_measurement: °C
device_class: temperature
friendly_name: Senzor temperatura ext. Actual
Just online status and when I triggered it with “Run”.
Hellis81
(Hellis81)
February 5, 2023, 7:52pm
6
Yes.
Remove the attributes lines.
Rofo
(Ro)
February 5, 2023, 7:53pm
7
Using dev tools, what is this sensors state value:-
sensor.senzor_temperatura_ext_actual_temperature
And does the history of that sensors state show it going above and below the thresholds you’ve set ?
-5.5
Yes, the sensor works normally.
And it should work?
I will give it a try. I will bring the sensor inside my house to read above 0°C and the I will move it out again to test.
Hellis81
(Hellis81)
February 5, 2023, 8:02pm
10
Yes that should work.
But you could also look at the generic thermostat.
Cosmin.FRC
(Cosmin F.)
February 5, 2023, 8:51pm
11
Removed the attributes line and no luck. It’s like this automation doesn’t exist…
Hellis81
(Hellis81)
February 5, 2023, 8:57pm
12
There is two lines with attribute.
What does the trace say?
Cosmin.FRC
(Cosmin F.)
February 5, 2023, 9:09pm
13
Yes. I removed them both!
Cosmin.FRC
(Cosmin F.)
February 5, 2023, 9:12pm
14
Hellis81:
What does the trace say?
Nothing at all. Just when I manually triggered it.
You cannot use the “Run” button to test automations that rely on trigger ids or trigger variables. That data is not generated when you press the “Run” button.
Test Method for automations with trigger based variables/conditions
Cosmin.FRC
(Cosmin F.)
February 5, 2023, 9:44pm
16
Got it, thanks for the tip!
Cosmin.FRC
(Cosmin F.)
February 6, 2023, 7:18am
17
I finally managed to make it work. I changed the trigger type from “Numeric State” to “Device” with the corresponding trigger (temperature change) and it worked.
Thanks guys for getting involved!