mk-maddin / wattpilot-HA

This is a custom component to allow control of Fronius Wattpilot wallbox/electro vehicle charging devices in Homeassistant.
Apache License 2.0
59 stars 10 forks source link

Add a missing time option for Australian daylight saving time #32

Closed pbrooks29 closed 10 months ago

pbrooks29 commented 10 months ago

Brilliant integration, working very well with new Wattpilot firmware 40.7. Thankyou for your work and time putting this together.

HA Logs are showing thousands of the following error message:

This error originated from a custom integration.

Logger: custom_components.wattpilot.select Source: custom_components/wattpilot/select.py:115 Integration: Fronius Wattpilot (documentation) First occurred: November 27, 2023 at 10:50:14 AM (25559 occurrences) Last logged: 9:28:07 AM

Wattpilot - tds: _async_update_validate_platform_state failed: state 3 not within options_id values: {0: 'None', 1: 'EuropeanSummerTime', 2: 'UsDaylightTime'}

The code does not understand the state value of '3' for this variable. No visible consequence as far as I can tell, but haven't gone through a summertime->non-summertime transition yet in this country.

In the Wattpilot app, timezone is set to "GMT+10:00 AEST Australian Eastern Standard Time" and 'Automatic change to daylight saving time' is selected ON. It is currently within summertime in Australia, and the displayed local time in the Wattpilot app is correct.

To Reproduce Steps to reproduce the behavior:

  1. Set a Wattpilot to the timezone settings above - GMT +10:00 Australian Eastern Standard Time,and automatic daylight savings change to ON
  2. Check HASS logs for un-handled return code of '3' for Australian (or southern hemisphere?) daylight saving time

What version of Home Assistant Core is installed Home Assistant 2023.10.0

What version of Wattpilot integration is installed Release 0.1.9

What version of Wattpilot are you using 22KW-V2 22J Go Firmware 40.7

Error message shown within Home Assistant log Wattpilot - tds: _async_update_validate_platform_state failed: state 3 not within options_id values: {0: 'None', 1: 'EuropeanSummerTime', 2: 'UsDaylightTime'}

Diagnostics information of Wattpilot integration Find and upload within HA Settings -> Devices & services -> Fronius Wattpilot -> Three dots -> Download diagnostics config_entry-wattpilot-3b55bc54926ad59482acc64c23ce8639.json.txt

pbrooks29 commented 10 months ago

Looking into the code, looks like just a new option '3' to be added in select.yaml around line 114 should solve it: 3: "AustralianDaylightTime"

mk-maddin commented 10 months ago

Hey,

Thanks for pointing this out. I was not able to find some "official value" for a value of 3 But as you said fix was easily added - see https://github.com/mk-maddin/wattpilot-HA/commit/058266e698a9a5cd497dd93c21e31c2e11f9fc76

It will be part of the next release.

pbrooks29 commented 10 months ago

I modified my local select.yaml file in the container and no further error messages for this. Thanks for the quick response.