olejens
February 12, 2025, 7:24pm
1
I am new to HA and struggle to set up a quite simple automation, hope someone can help me please
The automation is like this:
When “Buffertank” temperature sensor is higer than 65C AND “Brugsvand” temperature sensor is lower 58C Then “Actions”
My Yaml file:
alias: "Opvarme brugsvand fra buffertank "
description: ""
triggers:
- trigger: numeric_state
entity_id:
- sensor.buffertank_temp_top
above: 65
conditions:
- condition: numeric_state
entity_id: sensor.shellyplus1_2cbcbb2ffb90_temperature_5
below: 58
actions:
- type: turn_on
device_id: 12eb8b911d881b0c09501dc6902ce83b
entity_id: c22e20a023dbb51010e6467cdda0e31c
domain: switch
- type: turn_off
device_id: 6875e235cfcb6b90b0c07a4c5f6cbc7f
entity_id: 88dc5243d71893ce4f6f04db01768603
domain: switch
mode: parallel
Sir_Goodenough
((SG) WhatAreWeFixing.Today)
February 12, 2025, 7:26pm
2
Hello olejens ,
Welcome to the HA Forum!
Thanks for coming here and asking a question.
Would you be so kind as to adjusting the format of your code so that we can read it properly & check the YAML spacing, etc. Editing your original is the preferred way. It is very hard for us to tell what is what when the text formatter jumbles everything like that.
Use the </> button or this:
Here is an example of how to fix it from the site FAQ Page.
How to help us help you - or How to ask a good question .
Hellis81
(Hellis81)
February 12, 2025, 7:27pm
3
You need to have both the 65 an 58 entities as trigger and both of them as condition also.
olejens
February 12, 2025, 7:32pm
4
I am totaly new in this an not a programmer… is it posible you can explain a bit more pls… ?
Hellis81
(Hellis81)
February 12, 2025, 7:35pm
5
You only have two entities tank and brugsvand.
Those are the two entities, put them both as trigger and both as condition.
If you post the automation correctly formatted then me or someone else will edit your code.
But I’m not going to edit a code that is that much work to fix
olejens
February 12, 2025, 7:46pm
6
Now is the code correctly formattet
olejens
February 12, 2025, 8:04pm
7
Is it what you mean?
alias: "Opvarme forbrugsvand fra buffertank "
description: ""
triggers:
- trigger: numeric_state
entity_id:
- sensor.buffertank_temp_top
above: 65
- trigger: numeric_state
entity_id: sensor.shellyplus1_2cbcbb2ffb90_temperature_5
below: 58
conditions:
- condition: numeric_state
entity_id:
- sensor.buffertank_temp_top
above: 65
- condition: numeric_state
entity_id: sensor.shellyplus1_2cbcbb2ffb90_temperature_5
below: 58
actions:
- type: turn_on
device_id: 12eb8b911d881b0c09501dc6902ce83b
entity_id: c22e20a023dbb51010e6467cdda0e31c
domain: switch
- type: turn_off
device_id: 6875e235cfcb6b90b0c07a4c5f6cbc7f
entity_id: 88dc5243d71893ce4f6f04db01768603
domain: switch
mode: parallel