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

Error for pydantic post scene changes #100

Open
sanjoyg opened this issue Oct 16, 2024 · 1 comment
Open

Error for pydantic post scene changes #100

sanjoyg opened this issue Oct 16, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@sanjoyg
Copy link
Contributor

sanjoyg commented Oct 16, 2024

Getting the following errors while executing get_scenes @Leggin

2024-10-16 00:28:17.656 ERROR (MainThread) [homeassistant.components.scene] Error while setting up dirigera_platform platform for scene Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/dirigera_platform/scene.py", line 38, in async_setup_entry scenes: list[DirigeraScene] = await hass.async_add_executor_job(hub.get_scenes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 337, in get_scenes return [dict_to_scene(scene, self) for scene in scenes] ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/dirigera/devices/scene.py", line 148, in dict_to_scene return Scene(dirigeraClient=dirigera_client, **data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "pydantic/main.py", line 339, in pydantic.main.BaseModel.__init__ File "pydantic/main.py", line 1074, in pydantic.main.validate_model File "pydantic/fields.py", line 892, in pydantic.fields.ModelField.validate File "pydantic/fields.py", line 925, in pydantic.fields.ModelField._validate_sequence_like File "pydantic/fields.py", line 1091, in pydantic.fields.ModelField._validate_singleton File "pydantic/fields.py", line 881, in pydantic.fields.ModelField.validate File "pydantic/fields.py", line 1098, in pydantic.fields.ModelField._validate_singleton File "pydantic/fields.py", line 1154, in pydantic.fields.ModelField._apply_validators File "pydantic/class_validators.py", line 337, in pydantic.class_validators._generic_validator_basic.lambda13 File "pydantic/main.py", line 711, in pydantic.main.BaseModel.validate File "pydantic/main.py", line 339, in pydantic.main.BaseModel.__init__ File "pydantic/main.py", line 1074, in pydantic.main.validate_model File "pydantic/fields.py", line 881, in pydantic.fields.ModelField.validate File "pydantic/fields.py", line 1098, in pydantic.fields.ModelField._validate_singleton File "pydantic/fields.py", line 1154, in pydantic.fields.ModelField._apply_validators File "pydantic/class_validators.py", line 337, in pydantic.class_validators._generic_validator_basic.lambda13 File "pydantic/main.py", line 711, in pydantic.main.BaseModel.validate File "pydantic/main.py", line 339, in pydantic.main.BaseModel.__init__ File "pydantic/main.py", line 1074, in pydantic.main.validate_model File "pydantic/fields.py", line 857, in pydantic.fields.ModelField.validate pydantic.errors.ConfigError: field "trigger" not yet prepared so type is still a ForwardRef, you might need to call EndTriggerEvent.update_forward_refs().

@Leggin
Copy link
Owner

Leggin commented Oct 16, 2024

Hey @sanjoyg I tried to reproduce this with various configurations of scenes, but was not able to. Can you provide the scene that is causing this?

@Leggin Leggin self-assigned this Oct 16, 2024
@Leggin Leggin added the bug Something isn't working label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants