mrk-its / homeassistant-blitzortung

Custom Component for fetching lightning data from blitzortung.org
MIT License
200 stars 39 forks source link

"entry_type": "service" is deprecated and triggers warning with stacktrace in 2021.12-beta #38

Closed heikkih closed 2 years ago

heikkih commented 2 years ago

The following is triggered in 2021.12-beta

I've added a fix in PR #37

2021-12-06 22:01:52 WARNING (MainThread) [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. Stack (most recent call last): File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/usr/src/homeassistant/homeassistant/main.py", line 331, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 318, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 121, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete self.run_forever() File "/usr/local/lib/python3.9/asyncio/base_events.py", line 596, in run_forever self._run_once() File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1890, in _run_once handle._run() File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 500, in _async_add_entity device = device_registry.async_get_or_create(**processed_dev_info) # type: ignore[arg-type] File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 360, in async_get_or_create report( # type: ignore[unreachable] File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 71, in report _LOGGER.warning(msg, stack_info=True)