core: Init in ViCare integration fails due to missing device serial data point
The problem
Hello, since upgrading to the latest version of both Home Assistant Core and Home Assistant OS the Vicare integration no longer works. I tried removing it and reinstalling it. It does install successfully but does not find any device after starting.
What version of Home Assistant Core has the issue?
2024-9.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
vicare
Link to integration documentation on our website
https://www.home-assistant.io/integrations/vicare
Diagnostics information
config_entry-vicare-01J75TK55DRSE049YV3NPJ6QFC.json
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: homeassistant.components.number
Source: helpers/entity_platform.py:361
integration: Number (documentation, issues)
First occurred: 10:12:20 AM (4 occurrences)
Last logged: 10:46:14 AM
Error while setting up vicare platform for number
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
await asyncio.shield(awaitable)
File "/usr/src/homeassistant/homeassistant/components/vicare/number.py", line 272, in async_setup_entry
await hass.async_add_executor_job(
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/vicare/number.py", line 249, in _build_entities
entities.extend(
File "/usr/src/homeassistant/homeassistant/components/vicare/number.py", line 250, in <genexpr>
ViCareNumber(
File "/usr/src/homeassistant/homeassistant/components/vicare/number.py", line 292, in __init__
super().__init__(description.key, device_config, device, component)
File "/usr/src/homeassistant/homeassistant/components/vicare/entity.py", line 39, in __init__
serial_number=device.getSerial(),
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareUtils.py", line 55, in feature_flag_wrapper
return wrapper(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareUtils.py", line 48, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareDevice.py", line 17, in getSerial
return self.service.getProperty("device.serial")["properties"]["value"]["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareCachedService.py", line 26, in getProperty
return readFeature(entities, property_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareService.py", line 17, in readFeature
raise PyViCareNotSupportedFeatureError(property_name)
PyViCare.PyViCareUtils.PyViCareNotSupportedFeatureError: device.serial
Additional information
In the logs getting errors while setting up the platform for various types as shown for the example abovve
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 43 (17 by maintainers)
Review pending, it’s flagged as
fixand andblocking event loop, so I hope it will be fast. But leaving a review / approval in https://github.com/home-assistant/core/pull/125495 can be beneficial.Before we all manually run this script: when will there be an official update of the integration?
Thank you.
@johannesm1 you need to have the terminal & ssh add-on installed and enter the command in the terminal in the
configfolder. It will download the current state of the PR as a custom component overwriting the built-in vicare integration. If you do so, you will have no translation on the integration for now and when the fix is released you need to manually remove thevicarefolder from theconfig/custom_componentsfolder.@home-assistant close
@CFenner no, the issue has been solved… no issues with the integration anymore… thanks
Frenck said it’s going to be part of hass 2024.10.0 next week
@CFenner : I just testet the PR #125495 - which solved this problem 😄 The only thing I noticed: the labels for the sensors seem to be english now instead of german. Is this due to the PR and will not be the case once the PR is merged into the main code-base?
Tested ok. Integration loads and sensors work again. Thanks a lot, ready for winter to come.
@rolandsteinmeyer the second call should give a
data: []but the third should have one. Would be interesting if the software update could help here.Meanwhile I prepared a PR to mitigate this issue. Would be nice, if you could test it.
You can use this script to pull the changes from the PR to your instance:
@home-assistant rename Init in ViCare integration fails due to missing device serial data point
I have a Vitodens 200 WB2A with a Vitoconnect 100 OPTO1