Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

v2.3 Failed to setup #94

Open
Edluund opened this issue Oct 19, 2024 · 4 comments
Open

v2.3 Failed to setup #94

Edluund opened this issue Oct 19, 2024 · 4 comments

Comments

@Edluund
Copy link

Edluund commented Oct 19, 2024

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dirigera_platform/__init__.py", line 117, in async_setup_entry await platform.make_devices(hass,hass_data[CONF_IP_ADDRESS], hass_data[CONF_TOKEN]) File "/config/custom_components/dirigera_platform/ikea_gateway.py", line 97, in make_devices motion_sensors = await hass.async_add_executor_job(hub.get_motion_sensors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/dirigera/hub/hub.py", line 256, in get_motion_sensors return [dict_to_motion_sensor(sensor, self) for sensor in sensors] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/dirigera/devices/motion_sensor.py", line 34, in dict_to_motion_sensor return MotionSensor(dirigeraClient=dirigera_client, **data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for MotionSensor attributes -> isOn field required (type=value_error.missing)

@sanjoyg
Copy link
Owner

sanjoyg commented Oct 20, 2024

It seems the motion sensor you have doesnt have isOn field. What kind of motion sensors do you have in your installation

@Edluund
Copy link
Author

Edluund commented Oct 20, 2024

Its the old motion sensor:
Firmware: 24.4.5 Model: TRADFRI motion sensor Product-ID: E1745

@sanjoyg
Copy link
Owner

sanjoyg commented Oct 20, 2024

That is why its failing as it doesnt have isOn property. Would u want it to be ignored... i can put in a fix

@Edluund
Copy link
Author

Edluund commented Oct 20, 2024

As long as I'm still able to get data from the motion sensor a fix is fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants