I’m beggining with HA and I have some trouble with a simple (?) fonction…
For my swimming pool, I want to put an input_slider from 1 to 10 who configure the pump operating time. That, it’s okay. I make an input_boolean who stock status of the pump, that it’s okay too. But now, I went when I turn on my switch, it read the value from input_slider and switch off after this period. After that, I use Raspberry PI RF switch to switch on/off a remote power socket.
I sought from template but I don’t know if I can use this for my problem…
And to finish, my automations.yaml. I’ve tried this one :
- alias: 'Pump Off after x hours'
trigger:
platforme: state
entity_id: switch.pompe
from: 'off'
to: 'on'
for:
hours: state.input_slider.pompeheure.state
action:
service: switch.turn_off
entity_id: switch.pompe
And this one :
- alias: 'Pump Off after x hours'
trigger:
platforme: state
entity_id: switch.pompe
condition:
- condition: template
value_template: '{{ trigger.for > state.input_slider.pompeheure.state and state($
action:
service: switch.turn_off
data:
entity_id: switch.pompe
But my swith.pompe don’t turn_off after input_slider.pompeheure hours…