Skip to content

Commit

Permalink
update_forward_refs() calling to prevent field "trigger" not yet prep…
Browse files Browse the repository at this point in the history
…ared error
  • Loading branch information
slajob committed May 14, 2024
1 parent 23709ff commit 2d3b8bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dirigera/devices/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ def trigger(self) -> None:
def undo(self) -> None:
self.dirigera_client.post(route=f"/scenes/{self.id}/undo")

Trigger.update_forward_refs()
Action.update_forward_refs()
Scene.update_forward_refs()

def dict_to_scene(data: Dict[str, Any], dirigera_client: AbstractSmartHomeHub) -> Scene:
return Scene(dirigeraClient=dirigera_client, **data)

0 comments on commit 2d3b8bd

Please sign in to comment.