cgarwood / homeassistant-fullykiosk

Fully Kiosk Browser integration for Home Assistant
Apache License 2.0
153 stars 27 forks source link

Unexpected kwarg error when setting up NumberEntity with v1.0.0 and Home Assistant 2021.12.6 #77

Closed ErikSGross closed 2 years ago

ErikSGross commented 2 years ago

The error indicates that the step argument is not valid for a NumberEntityDescription. It looks like that argument was added to the HA core in a recent PR (https://github.com/home-assistant/core/pull/61100), but I don't see that PR tagged for the 2021.12 release. Though the error references the first unknown kwarg, it's also applicable for min_value and max_value.

From limited testing so far, the integration appears to be functioning properly other than:

By commenting out lines 13-15, 21-22, and 28-29 of number.py (lines referencing the new kwargs), the integration loads without errors and the new number entities are present.

2021-12-28 09:13:51 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Tablet for number
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 81, in async_setup_entry
return await component.async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 147, in async_setup_entry
platform = await async_prepare_setup_platform(
File "/usr/src/homeassistant/homeassistant/setup.py", line 309, in async_prepare_setup_platform
platform = integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 530, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 535, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/custom_components/fullykiosk/number.py", line 10, in <module>
NumberEntityDescription(
TypeError: __init__() got an unexpected keyword argument 'step'
cgarwood commented 2 years ago

That's what I get for running HA dev builds on my instances 😅 - working on a patch now