Skip to content

v10.4.0

Choose a tag to compare

@lexpostma lexpostma released this 26 Nov 11:04
· 3 commits to main since this release
90dc57d

Notable changes

  • has_v2_api only returns True for models this library supports on the v2 API: P1 Meter, Energy Socket, kWh Meters and Plug-In Battery. Devices of other models that enable the v2 API, for example with beta firmware, keep using the v1 API. The device must also answer an unauthenticated GET /api with 401.
  • has_v2_api accepts an optional product_type. Pass it when the type is already known, for example from discovery or a config entry: unsupported models then return False without connecting. The websession argument is still accepted, but no longer used.
  • The check now uses a single TLS connection to the device.

What's Changed

  • Send requests one at a time to keep one connection open per device by @lexpostma in #642
  • Fix timeout type in has_v2_api using ClientTimeout by @Livyon in #640
  • Only report v2 API support for officially supported models by @lexpostma in #643

New Contributors

Full Changelog: v10.3.0...v10.4.0