Skip to content

Use UTC datetimes internally & fix new HA 2024.11 error

Latest
Compare
Choose a tag to compare
@pnbruckner pnbruckner released this 18 Nov 16:34

What's Changed

  • Python datetime object comparisons and math don't work as expected when the objects are aware and have the same tzinfo attribute. Basically, the fold attribute is ignored in this case, which can lead to wrong results. Avoid this problem by using aware times in UTC internally. Only use local time zone for user visible attributes.
  • Also, HA 2024.11 no longer allows calling async_config_entry_first_refresh after the config entry has been set up. Since we have two subclasses of DataUpdateCoordinator that share the same config entry, call async_refresh instead for the MemberDataUpdateCoordinator.

Full Changelog: 0.5.3...0.5.4