Skip to content
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

Duration time attributes format #257

Closed
lcavalli opened this issue Jan 5, 2022 · 13 comments
Closed

Duration time attributes format #257

lcavalli opened this issue Jan 5, 2022 · 13 comments

Comments

@lcavalli
Copy link

lcavalli commented Jan 5, 2022

Is it possible to format duration time attributes by adding the seconds at the end of the timetag as ":00"? This will make this integration compatible with timer bar card used to display a progress bar with remaining times. See rianadon/timer-bar-card#15

As a workaround currently it is required to define custom template sensors by manually adding the seconds.

Thanks.

@ollo69
Copy link
Owner

ollo69 commented Jan 9, 2022

This would be a breaking change because all automations and cards are based on current format, so I prefer to avoid this. Platform template is the right solution to format time values as you need.

@lcavalli
Copy link
Author

lcavalli commented Jan 9, 2022

I'm not a big fan of sensor duplication with template platform, but I can understand your opinion regarding the regression. In any case, reading this page https://www.home-assistant.io/integrations/timer/ , I think that the default way to express a duration in HA is with 00:00:00 format.

@KTibow
Copy link
Contributor

KTibow commented Jan 9, 2022

I can update the card if needed.

@ollo69
Copy link
Owner

ollo69 commented Jan 9, 2022

Ok, I will think a little bit more about this. Using standard format is better, I'm just worried about the coming issue due to the breaking change.

@KTibow
Copy link
Contributor

KTibow commented Jan 9, 2022

You've done breaking changes in the past. It should be okay.

@ollo69
Copy link
Owner

ollo69 commented Jan 11, 2022

Just committed this change in master branch.

@KTibow,

can you please create a PR to update the card so that I will create a new release with both changes?

Thanks.

@KTibow
Copy link
Contributor

KTibow commented Jan 12, 2022

Actually, just from glancing at the card's code, it should work fine. Can someone else test the card (my integration is broken ATM)?

@lcavalli
Copy link
Author

Installed the card with the updated integration and it seems to work out of the box.

@lcavalli
Copy link
Author

Yesterday with the updated integration and card active the dryer suddenly stopped the program. I don't think it is related, but better testing.

@BebeMischa
Copy link

Before I update, what exactly is breaking in this update? The changelog says, there are breaking changes...

@ollo69
Copy link
Owner

ollo69 commented Jan 18, 2022

The format of attributes / sensors Initial time, Remain time and Reserve time are changed, now they provide also the seconds (e.g it change from 0:00 to 0:00:00).
The card available in readme still work and do not need update. If you have some sensor template that manipulate those sensor, you need ti be sure that still work and fix that template if required.

@BebeMischa
Copy link

ok, thank you. that should not affect my setup, i think... we will see. going to give it a shot now ;-)

@ollo69
Copy link
Owner

ollo69 commented Jan 18, 2022

I close this FR, feature now is implemented and released. If there are some problem with feature please open a new issue describing details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants