jugla/worldtidesinfocustom

Device Registry entry_type Deprecation Warning HA 2021.12.x

Closed this issue · 3 comments

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):

  • HA: 2021.12.4

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

  • sensor.py line 541
  • camera.py line 195

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

Thanks for the warning !
I will handle it !

jugla commented

shall be fixed with v8.2.0

jugla commented

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 $