Skip to content

How do I start a timer from an attribute? #71

@el97

Description

@el97

Hi! I'm trying to make a timer start based on when an attribute changes. More specific I want a timer to start when the sun goes down and vise versa. With the current code I can only see if the sun is above or below the horizon. What am I doing wrong?
This is what I have tried with and below is what comes out with it

type: custom:timer-bar-card
name: Sunrise
icon: mdi:weather-sunset-up
entity: sun.sun
start_time: 
  attribute: next_setting
end_time:
  attribute: next_rising
debug: true
guess_mode: true
bar_width: 54%
text_width: null
State: below_horizon (state mode = idle)
Mode: idle (auto mode = N/A, used)
Duration: -26751.153 second
Time remaining: 18882.293
Counter: 18882.294
Did you set active_state? Attr: {"next_dawn":"2023-01-12T06:38:20.467703+00:00","next_dusk":"2023-01-12T15:36:38.479040+00:00","next_midnight":"2023-01-12T23:07:40+00:00","next_noon":"2023-01-12T11:07:05+00:00","next_rising":"2023-01-12T07:24:32.894894+00:00","next_setting":"2023-01-12T14:50:24.047322+00:00","elevation":-43.98,"azimuth":58.88,"rising":true,"friendly_name":"Sun"}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions