Closed tbaumann closed 2 years ago
This works
template:
- sensor:
- name: "Rice Cooker Timer"
unique_id: xiaomi_miio_cooker_timer
icon: mdi:timer
state: '{{states("sensor.xiaomi_miio_cooker_mode")}}'
attributes:
duration: '0:{{ states("sensor.xiaomi_miio_cooker_duration") }}:00'
start_time: "{{ states.sensor.xiaomi_miio_cooker_mode.last_changed }}"
remaining: '0:{{ states("sensor.xiaomi_miio_cooker_remaining")}}:00'
type: custom:timer-bar-card
entities:
- sensor.rice_cooker_timer
active_state: Running
active_icon: mdi:fire
bar_direction: rtl
invert: true
bar_foreground: orange
bar_background: grey
But it would be damn nice if I just had to specify duration:
and remaining:
entities in the card.
Also, is there any way of getting time remaining displayed in minute granularity instead with seconds?
It worked fantastically. But it randomly stopped Time Remaining is 0 But attribute remaining says otherwise.
Looked pretty nice while it worked. Any idea how to make it reliable?
I'd try removing start_time
. remaining
and duration
should be enough for the card to figure out how much time is left.
However, that's once I merge #47. I keep forgetting about that.
Good idea with the minute granularity. I'll add that in.
Thanks a lot, somehow I thought start_time
was required.
Hi,
I only have duration (minutes), remaining (minutes) and a state entry to work with.
There is no really easy way to calculate absolute start or end time. Except to perhaps extract it from the time of the state transition.
Should I look for a different card? Or worth trying to get it to work?
Cheers