krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
415 stars 45 forks source link

Error while creating timezone info for "AEST" #402

Closed krahabb closed 4 months ago

krahabb commented 6 months ago
          I am also starting to see these which then get reported as repairs regarding timezones for my various Meross devices.
This error originated from a custom integration.

Logger: custom_components.meross_lan.mss310_###############################2
Source: custom_components/meross_lan/helpers/__init__.py:246
integration: Meross LAN (documentation, issues)
First occurred: 5:30:51 AM (3 occurrences)
Last logged: 6:14:56 AM

Incorrect timestamp: 1709235048 seconds behind HA
Error('AEST') while using pytz to build timezone(AEST)
Error('No time zone found with key AEST') while building timezone(AEST) info for Appliance.System.Time
This error originated from a custom integration.

Logger: custom_components.meross_lan.mss310_###############################3
Source: custom_components/meross_lan/helpers/__init__.py:246
integration: Meross LAN (documentation, issues)
First occurred: 5:30:12 AM (5 occurrences)
Last logged: 5:33:32 AM

Unable to load timezone info for AEST - check your python environment
Appliance.Control.Multiple failed with no response: requests=4 expected size=3290
Appliance.Control.Multiple failed with no response: requests=4 expected size=3083
Appliance.Control.Multiple failed with no response: requests=3 expected size=2218

_Originally posted by @purcell-lab in https://github.com/krahabb/meross_lan/issues/397#issuecomment-1971888280_

krahabb commented 6 months ago

I'm trying to fix this issue but as far as I can understand the AEST timezone is not set in the python libraries so you should 'revert' to using any Australia/<city> configuration.

I guess the AEST configuration was set automatically when meross_lan detected that devices timezones where not 'in line' with your HA configuration. When this happens, meross_lan uses the HA provided key to automatically fix the device configuration (through raising an 'issue' with a 'repair' option). If this is the case, I cannot understand why HA provides this key (AEST) even if it doesn't appear in the standard IANA names. These timezone names are always a mess though and right now I suggest you to enter device(s) configurations and set one of the 'legal' names for timezone. meross_lan in turn will just check that the UTC offset of the device align with the UTC offset of HA (this happens anyway only for some type of devices like power metering plugs or thermostats) so, as far as the timezones have the same offset, it should not raise any HA 'issue'

purcell-lab commented 6 months ago

Some additional data from me.

I set these devices up almost 2 years ago and they have been rock solid, so I haven't updated their configuration.

I have just gone into the MEROSS app and updated the tz for my fridge to Australia/Brisbane and see how that fairs.

meross_lan-08c86598fc0b5e70f5fd2d43e7a96676-fridge-0e58a786b4809e88951a4079dc29396f.json