Closed ResteNarquois closed 1 year ago
HA 2023.8.0 is now public, this is still an issue.
This is an issue with 2023.8 (now GA) and >= 4.9.0 of this custom component.
Can't use latest stable 4.8.0 due to another issue already documented related to Unable to install package pygrocy==1.4.1
ran into the same problem after upgrading to 2023.8 the workaround provided:
Replacing line 40: software_version=VERSION, with sw_version=VERSION,
works! Thank you.
👍 for the suggestion to change software_version
to sw_version
. Note I did have to actually restart my HA (not just reloading the integration) before the change took effect.
Unless all relevant information is provided, I can't help you
Describe the bug Integration fails to set up sensors and binary sensors in HA 2023.8.0.0b beta due to unexpected key in
entity.py
Issue appears to be with device registration section in
entity.py
.Replacing line 40:
software_version=VERSION,
withsw_version=VERSION,
as per https://developers.home-assistant.io/docs/device_registry_index/
allows integration sensors to be created as per expectations.
Expected behavior That sensors should be created
To Reproduce Steps to reproduce the behavior:
General information to help debugging:
What sensors do you have enabled? Are they working and/or what state are they in? Do you have the corresponding functions enabled in Grocy? I currently only have the Shopping List and Stock sensors enabled, but both were showing as 'unavailable'. Corresponding functions are OK in Grocy.
What is your installed versions of Home Assistant, Grocy and this integration? HA Core 2023.8.0.0b HAOS 10.4 Supervisor 2023.07.2 Grocy Addon 0.19.1
How do you have Grocy installed? Add-on or external? Addon
Have you added debugging to the log, and what does the log say? Not yet
JSON service data (if related to using a service)
Additional context Add any other context about the problem here. Log entries:
` Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:619 Integration: Sensor (documentation, issues) First occurred: 09:02:42 (2 occurrences) Last logged: 09:02:42
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity device = dev_reg.async_get(self.hass).async_get_or_create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: DeviceRegistry.async_get_or_create() got an unexpected keyword argument 'software_version' `
` Logger: homeassistant.components.binary_sensor Source: helpers/entity_platform.py:619 Integration: Binary Sensor (documentation, issues) First occurred: 09:02:42 (2 occurrences) Last logged: 09:02:42
Error adding entities for domain binary_sensor with platform grocy Error while setting up grocy platform for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity device = dev_reg.async_get(self.hass).async_get_or_create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: DeviceRegistry.async_get_or_create() got an unexpected keyword argument 'software_version' `