I’ve used a different approach for manually running my pool pump which you might like or be able to customize it.
alias: Pool Runtime Manual Start
description: ''
trigger:
- platform: state
entity_id:
- input_number.pool_manual_runtime
for:
hours: 0
minutes: 0
seconds: 3
condition: []
action:
- service: timer.start
data:
duration: '{{ states(''input_number.pool_manual_runtime'') | float(1) * 60 * 60 }}'
target:
entity_id: timer.pool_manual_runtime_timer
- service: homeassistant.turn_on
data: {}
target:
entity_id:
- switch.pentair_f7_dc_7a_pool
- service: input_number.set_value
data:
value: 0
target:
entity_id: input_number.pool_manual_runtime
mode: single
alias: Pool Shutoff After Manual Runtime
description: ''
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.pool_manual_runtime_timer
- platform: state
entity_id: input_number.pool_manual_runtime
to: '0'
for:
hours: 0
minutes: 0
seconds: 5
condition: []
action:
- service: homeassistant.turn_off
data: {}
target:
entity_id:
- switch.pentair_f7_dc_7a_pool
mode: single
lovelace
type: custom:auto-entities
card:
type: entities
state_color: true
title: Pool Summary
entities:
- entity: input_number.pool_manual_runtime
tap_action:
action: call-service
service: script.pool_manual_run_add
- entity: timer.pool_manual_runtime_timer
title: Pool Summary
state_color: true
filter:
exclude:
- state: idle
If I manually add time to the pool_manual_runtime it will set the timer for that amount and run the pump. Or I have it set so I can click it and it’ll ‘add’ time to the existing amount so I can ‘increase it’ in steps of 10 minutes with a script.
add script:
alias: Pool Manual Run Add
sequence:
- service: input_number.increment
data: {}
target:
entity_id: input_number.pool_manual_runtime
mode: queued