-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Hi,
I’m running Home Assistant with the custom integration dirigera_platform.
During setup the integration fails with a Pydantic ValidationError when at least
one motion sensor does not report attributes.batteryPercentage.
Stacktrace excerpt:
pydantic_core._pydantic_core.ValidationError: 1 validation error for MotionSensor
attributes.batteryPercentage
Field required [type=missing]
The IKEA Dirigera hub returns a valid motion sensor object, but without
batteryPercentage in attributes. This causes the entire config entry setup
to fail.
Observed behavior:
- Integration setup aborts completely
- No devices are created
- Happens consistently with a specific motion sensor
Expected behavior:
batteryPercentageshould be optional- Integration should tolerate missing battery values and continue setup
Additional notes:
- The affected device is visible in the IKEA Smart Home app
- Firmware is up to date
I believe should define batteryPercentage as optional
(e.g. int | None = None) to avoid hard failures on incomplete device payloads.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels