Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Handle Peblar without customization firmware #28

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Conversation

frenck
Copy link
Owner

@frenck frenck commented Jan 3, 2025

Proposed Changes

There are Peblar white-labeled products around that apparently do not have customizations in their firmware.

As reported here: home-assistant/core#134022 (comment)

image

Unexpected error fetching Peblar Peblar version data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/peblar/coordinator.py", line 81, in handler
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/peblar/coordinator.py", line 133, in _async_update_data
available=await self.peblar.available_versions(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/peblar/peblar.py", line 190, in available_versions
return PeblarVersions.from_json(result)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "", line 8, in mashumaro_from_json
mashumaro.exceptions.MissingField: Field "customization" of type str is missing in PeblarVersions instance

This PR mitigates that, by marking this field optional. This will need a small adjustment in Home Assistant upstream, to only create the update entities when the customization firmware is present.

@frenck frenck added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Jan 3, 2025
@frenck frenck merged commit e5d0dd5 into main Jan 3, 2025
24 checks passed
@frenck frenck deleted the frenck-2025-0006 branch January 3, 2025 08:45
@github-actions github-actions bot locked and limited conversation to collaborators Jan 4, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bugfix Inconsistencies or issues which will cause a problem for users or implementers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant