Leggin / dirigera

This repository provides an unofficial Python client for controlling the IKEA Dirigera Smart Home Hub.
MIT License
99 stars 17 forks source link

IKEA Motion Sensor attributes.lightLevel error #59

Closed andreatassi closed 3 months ago

andreatassi commented 3 months ago

Hello!

FYI, of I use "motions_sensors = dirigera_hub.get_motion_sensors()" I get the following error:

Exception has occurred: ValidationError 1 validation error for MotionSensor attributes.lightLevel Field required [type=missing, input_value={'customName': 'Sensor 3'... 'circadianPresets': []}, input_type=dict] For further information visit https://errors.pydantic.dev/2.6/v/missing File "/home/atassi/GITrepos/luxSalus/src/ikea.py", line 8, in motions_sensors = dirigera_hub.get_motion_sensors() pydantic_core._pydantic_core.ValidationError: 1 validation error for MotionSensor attributes.lightLevel Field required [type=missing, input_value={'customName': 'Sensor 3'... 'circadianPresets': []}, input_type=dict] For further information visit https://errors.pydantic.dev/2.6/v/missing

Leggin commented 3 months ago

Hey! Thanks for finding this, looks like a small change is needed to make the lightLevel optional. I will take care as soon as I find the time, if no one else is faster ;)