-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google home timers, custom time format #19
Comments
This looks like a duplicate of #18, so I'm going to close this one and move discussion there! |
@rianadon I first posted in that ticket but the difference was timer vs alarm so i moved to a new ticket and deleted comment instead since some attributes were different, but i guess its same enough.. |
Oh sorry my bad I didn't see the distinction. I'll reopen! |
For the timer, I see you have both a You will also need to set |
I just tried this cause I'd like this too, but I get an error showing "cannot use "in" operator to search for "fixed" in local_time_iso" Config: type: custom:timer-bar-card |
finally got debug info now with config debug info is |
Sorry about the long response time! @gmcaesar The format for duration is not so simple, due to me trying to support a few different options. The Making a simpler visual editor for the configuration is on the todo list, but I won't have time for it for a while. Thank you @Frooodle for the debugging information. I see the problem: there's actually no I'm very unfamiliar with these google home timers. Will there ever be more than one? Is this entity supposed to represent a group of timers? Nevertheless the card does not support attributes nested inside attributes at the moment. |
Yes I found that {attribute: } and changed it, and yes there can be more than one timer running at a time |
If there is potentially more than one timer, I don't think there is any clean way to do this without templates. The you would have to create a template entity for the first timer, second timer, etc A nicer method would be creating a new card for a google home timer set entity that embeds the timer bar card, similar to how my opensprinkler card is a special case of timer bar card for sets of sprinkler valves. This isn't something I'd be able to maintain due to my lack of access to Google Home, but if anyone wants to do this I'd gladly help with the initial code. |
I see the state value of the timer sensor is that of the last timers local_time_iso, perhaps for a single timer usecase we can pickup that state value for end_time rather than looking inside timers itself if that cant be done? |
Good idea! I'll add an option for using state values. |
Published in 1.11! Unfortunately, duration is still embedded within that timer list, so you'll need to either pull it out with a template, or use |
I have tried a couple of ways to get this working and for some reason no go..... I must be missing something attempt number one: type: custom:timer-bar-card debug on this returns: State: 2021-09-18T22:08:55-07:00 (state mode = idle) where both the end time and duration entities are set by a node red flow that pulls apart the sensor, then I thought maybe the end_time did not support the entity, so I tried this (with both guess mode true and false...): type: custom:timer-bar-card debug on this returns: State: 22:08:00 (state mode = idle) if i had to guess it would be that the state is idle but am i missing something? |
found my own anwser - one more entity needed: type: custom:timer-bar-card |
Here's a template sensor that works with the Google Home integration and this card. You'll have to create a template for each Google Home entity you need. This will only work for the first timer. You can create additional sensors for multiple timers per google entity by changing
The integration attribute is added so you can easily use an auto-entities card to display all of your google home timers in a card.
|
@jazzyisj Awesome! that works perfectly! doesn't work for timers greater that 24 hours but for my usecase thats fine, thanks! |
See #140 (comment) for better support |
I am trying to setup google home timers with this however their time format is a bit different, i cant show debug info due to some issues but this is attribute data. Any ideas?
entity name is sensor.kitchen_display_timers
state is 2021-09-05T22:27:04+00:00
state attributes are...
next_timer_status: set
timers:
fire_time: 1630880824
local_time: '2021-09-05 22:27:04'
local_time_iso: '2021-09-05T22:27:04+00:00'
duration: '0:20:00'
status: set
label: null
integration: google_home
friendly_name: Kitchen display timers
icon: mdi:timer-sand
device_class: timestamp
Only mention of a start time i can see here is from update time values or from doing end minus duration since in example above
fire time (epoch) and local times all have the end time of the timer
The text was updated successfully, but these errors were encountered: