atv
(atv)
February 11, 2022, 10:20am
1
I have this timer input boolean which i start when there is a active flood and stop when there isn’t. It works fine, but i’d like to show the value on the right side, rather then saying ‘Idle’.
Is there any way of doing that? Currently using a entity card.
tom_l
February 11, 2022, 10:28am
2
What is a timer input boolean?
They are two separate integrations.
zoogara
(Daryl)
February 11, 2022, 10:50am
3
While a timer is running it has these attributes:
duration: 0:01:00
editable: false
finishes_at: 2022-02-11T10:45:27+00:00
remaining: 0:01:00
I did a quick test templating a sensor for remaining, which works - except the value doesn’t update
This could be a bug in the Timer integration, but maybe you could do something with finishes_at.
The sensor I tested with looks like:
template:
sensor:
- name: "Remaining"
state: "{{ state_attr('timer.trigger_debounce', 'remaining') }}"
But as I said the “remaining” attribute doesn’t actually change from the initial value.
tom_l
February 11, 2022, 11:18am
4
Just display the timer remaining attribute in an entities card. It supports displaying attributes.
https://www.home-assistant.io/lovelace/entities/#attribute
type: entities
title: Flood Time
entities:
- type: attribute
entity: timer.trigger_debounce
attribute: remaining
atv
(atv)
February 11, 2022, 11:18am
5
Sorry, just a timer indeed. Messing to much with input booleans around and i’m confusing them.
atv
(atv)
February 11, 2022, 11:23am
6
I just start a timer.start and my entity is timer.flood_active_time. But i don’t see any remaining time attribute.
tom_l
February 11, 2022, 11:24am
7
You said this before:
It’s probably because your timer has no duration in the picture you posted.
1 Like
zoogara
(Daryl)
February 11, 2022, 11:40am
8
“Remaining” attribute doesn’t work. there was a Github issue opened for it but no action.
zoogara
(Daryl)
February 11, 2022, 11:44am
9
A timer counts down - not up, and triggers various events when the countdown starts, finishes or is cancelled.
If you simply want to display the amount of time since an event, create a template sensor.
atv
(atv)
February 11, 2022, 11:58am
10
Ah ok, i thought i could use a timer/input boolean of some sort to tell me how long something has been running.
This template sensor, can i use the UI for this or should i best use some yaml code for that?
Thanks,