timer-bar-card
timer-bar-card copied to clipboard
double_tap_action is triggered when tapping once
Describe the bug The following configuration uses "double_tap_action" to add 5 minutes onto a timer, however if I double tap it will execute the script twice. If I tap just once, then the script is executed once. This only appears to affect mobile devices, desktop browser is fine.
As tap_action
is set to none, I would expect a single tap to not execute anything.
Additionally, if I do have a tap_action
, I have noticed that the tap_action
will trigger when tapping the icon, however if you tap (once) the timer bar then it will trigger the double_tap_action
Your card configuration
type: custom:timer-bar-card
entity: timer.light_bedroom
name: Bedside
invert: true
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: call-service
service: script.timer_add_5min
data:
timer_entity: timer.light_bedroom
mushroom:
icon_color: orange
Script in case that helps:
fields:
timer_entity:
name: Timer entity
description: Timer entity to add time to
required: true
sequence:
- service: timer.start
data:
duration: >
{% set timer_finished_at = state_attr(timer_entity, 'finishes_at') %} {%
if timer_finished_at == None %}
{% set end_time = now() %}
{% else %}
{% set end_time = strptime(timer_finished_at, '%Y-%m-%dT%H:%M:%S%z') %}
{% endif %}
{{ ((end_time - now()).total_seconds() | int) + 300 }}
target:
entity_id: "{{ timer_entity }}"
alias: timer.add_5min
mode: single
Debug information
Please add debug: true
to your configuration and either take a screenshot or paste the output here!