jugla / worldtidesinfocustom

world tides info custom component for home assistant
MIT License
27 stars 2 forks source link

Device Registry entry_type Deprecation Warning HA 2021.12.x #15

Closed ChrisRomp closed 2 years ago

ChrisRomp commented 2 years ago

Describe the bug Deprecation warning in HA log:

[homeassistant.helpers.frame] Detected code that uses str for device registry entry_type. This is deprecated and will stop working in Home Assistant 2022.3, it should be updated to use DeviceEntryType instead. Please report this issue.

To Reproduce Steps to reproduce the behavior: Run HA version 2021.12.x with the component loaded.

Expected behavior Don't do that. ;)

Screenshots n/a

Desktop (please complete the following information):

Additional context I'm seeing two instances of entry_type in the code:

Per the HA developer docs, this is now an enum, DeviceEntryType. I don't see the enum members defined in the docs.

Ref: https://developers.home-assistant.io/docs/device_registry_index/#device-properties

jugla commented 2 years ago

Thanks for the warning ! I will handle it !

jugla commented 2 years ago

shall be fixed with v8.2.0

jugla commented 2 years ago

Hello, I close the issue with 8.2.0. Below the log (before update) : home-assistant.log:2021-12-21 04:01:11 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that uses str for device registry entry_type. This is deprecated and will Home Assistant 2022.3, it should be updated to use DeviceEntryType instead. Please report this issue. After update : ~/.homeassistant $ grep "Detected code that uses str for device registry entry_type" *log ~/.homeassistant $