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

Let climatisation_time_left and charging_time_left return minutes #89

Merged
merged 1 commit into from Jun 24, 2023

Conversation

dvx76
Copy link
Member

@dvx76 dvx76 commented Jun 4, 2023

These sensors have device_class=duration so we should return an int of float with a duration unit, and not a formatted 'hh:mm' string. This will allow HA to correctly display the duration and also allow to use the sensor value in automations/calculations.

Fixes skodaconnect/homeassistant-skodaconnect#195

These sensors have device_class=duration so we should return an int of
float with a duration unit, and not a formatted 'hh:mm' string. This
will allow HA to correctly display the duration and also allow to use
the sensor value in automations/calculations.

Fixes skodaconnect/homeassistant-skodaconnect#195
@dvx76
Copy link
Member Author

dvx76 commented Jun 5, 2023

@Farfar @WebSpider can you review this please?

@haraldpaulsen
Copy link

Can I test/review this code to speed things along?

@dvx76
Copy link
Member Author

dvx76 commented Jun 14, 2023

Can I test/review this code to speed things along?

Sure thing. Depending on how you're running HA you might be able to just apply the same code changes and restart HA.

@WebSpider
Copy link
Contributor

Been away for work, I'll get to a review this week

@haraldpaulsen
Copy link

Sure thing. Depending on how you're running HA you might be able to just apply the same code changes and restart HA

Unfortunately I run HAOS, so I don't have access to the skodeconnect-library on disk through file editor or shell.

As @WebSpider will have a look, I can wait and have a look at doing a lab install of home assistant at a later time

@haraldpaulsen
Copy link

This is slightly offtopic, but curiosity got me..

In the Home Assistant/HACS-file /config/custom_components/skodaconnect/manifest.json
I have:
"requirements": ["skodaconnect>=1.3.5", "homeassistant>=2023.3.0"],

Could I somehow make it require the specific pull request?
ie, "git+github.com/dvx76/skodaconnect.git@fix-durations" or something like that?

Or would I end up just cluttering my python/pip-folders even if I change it back later?

@haraldpaulsen
Copy link

Been away for work, I'll get to a review this week

Did you get a chance to look at this? :-)

@WebSpider
Copy link
Contributor

Thanks for the mention. I looked at it, the code looks sane, and I'll test it in my test setup against latest release today.

@WebSpider WebSpider merged commit 602010a into skodaconnect:main Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Charging time left is always showing whole hours
3 participants