core
core copied to clipboard
Update systembridgeconnector to 3.4.8 and handle optional attributes
Proposed change
Updates connector and handles missing/optional attributes in sensor platform.
Update changelog (monorepo so not all changes are related):
https://github.com/timmo001/system-bridge/releases/tag/3.4.8 https://github.com/timmo001/system-bridge/compare/3.4.4...3.4.8 https://github.com/timmo001/system-bridge/releases
Type of change
- [x] Dependency upgrade
- [x] Bugfix (non-breaking change which fixes an issue)
Additional information
- This PR is related to issue: #77731
Checklist
- [x] The code change is tested and works locally.
- [x] Local tests pass. Your PR cannot be merged unless tests pass
- [x] There is no commented out code in this PR.
- [x] I have followed the development checklist
- [x] The code has been formatted using Black (
black --fast homeassistant tests) - [x] Tests have been added to verify that the new code works.
If the code communicates with devices, web services, or third-party tools:
- [x] The manifest file has all fields filled out correctly.
Updated and included derived files by running:python3 -m script.hassfest. - [x] New or updated dependencies have been added to
requirements_all.txt.
Updated by runningpython3 -m script.gen_requirements_all. - [x] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [x] Untested files have been added to
.coveragerc.
The integration reached or maintains the following Integration Quality Scale:
- [x] 🥈 Silver
To help with the load of incoming pull requests:
- [x] I have reviewed two other open pull requests in this repository.
Hi,
after applying this patch manually (by replacing the sensor.py file with the version from this PR) I only get one entity "binary_sensor.
2022-11-12 10:21:45.073 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up system_bridge platform for sensor
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/system_bridge/sensor.py", line 309, in async_setup_entry
for display in coordinator.data.display.displays:
TypeError: 'NoneType' object is not iterable
I also manually updated systembridgeconnector to version 3.4.8
Wrapping these lines into a if coordinator.data.display.displays is not None: fixed the problem for me. I did not look into the code how I could end up with coordinator.data.display.displays being None.
Fixed conflict
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:
Looks good to me, ready to go when you are :)
Looks good to me, ready to go when you are :)
All in working order. Ready :)