-
Notifications
You must be signed in to change notification settings - Fork 27
Description
I love your timer bar card! Thanks for making it!
I'm using the option where it gets the duration from a script. The duration that it gets is often either blank or the duration from the previous time the script had been run.
The script is started by a button, which passes the duration to the script:
show_name: true
show_icon: true
type: button
entity: switch.innr_sp_224_switch
name: Water circulation 3 min
icon: mdi:autorenew
tap_action:
action: perform-action
perform_action: script.hot_water_with_data
data:
circ_time: "00:02:55"
hold_action:
action: perform-action
perform_action: script.cancel_water_circulation
grid_options:
columns: 6
rows: 2
icon_height: 50px
Here is the script:
alias: Hot water with data
mode: restart
description: Opens valve and runs circulation for time determined by data
fields:
circ_time:
description: hours:minutes:seconds
sequence:
- type: turn_on
device_id: 89f7eebae85db0287c2421ce889a3efb
entity_id: d1b4e14d64ccf510bb02489b8ac1b6d5
domain: switch - type: turn_on
device_id: 43ca17ec3b58e48ff8e8aaaa280ea0cf
entity_id: 6be6f4369d6ef30552dc1471ae1f6a19
domain: switch - delay: "{{ circ_time }}"
- type: turn_off
device_id: 43ca17ec3b58e48ff8e8aaaa280ea0cf
entity_id: 6be6f4369d6ef30552dc1471ae1f6a19
domain: switch - type: turn_off
device_id: 89f7eebae85db0287c2421ce889a3efb
entity_id: d1b4e14d64ccf510bb02489b8ac1b6d5
domain: switch
Your card configuration
show_name: false
show_icon: true
state_color: true
icon: mdi:autorenew
icon_height: 50px
name: ""
type: custom:timer-bar-card
duration:
script: script.hot_water_with_data
entity: switch.innr_sp_224_switch
grid_options:
columns: 12
rows: 1
Caveats
It is set up this way so multiple controls can start the script with different durations. It works well, except for the timer bar card not always using the duration that was just passed to the script.
Thanks!