Skip to content

Commit

Permalink
make optional values default to None
Browse files Browse the repository at this point in the history
  • Loading branch information
Leggin committed Feb 16, 2024
1 parent 736b0f1 commit f34a9b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/dirigera/devices/outlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class OutletAttributes(Attributes):
is_on: bool
startup_on_off: Optional[StartupEnum]
startup_on_off: Optional[StartupEnum] = None


class Outlet(Device):
Expand Down
12 changes: 6 additions & 6 deletions src/dirigera/devices/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class SceneAttributes(Attributes):
scene_id: str
name: str
icon: str
last_completed: Optional[str]
last_triggered: Optional[str]
last_undo: Optional[str]
last_completed: Optional[str] = None
last_triggered: Optional[str] = None
last_undo: Optional[str] = None


class Info(BaseIkeaModel):
Expand Down Expand Up @@ -45,9 +45,9 @@ class Scene(BaseIkeaModel):
triggers: List[Trigger]
actions: List[Action]
created_at: datetime.datetime
last_completed: Optional[datetime.datetime]
last_triggered: Optional[datetime.datetime]
last_undo: Optional[datetime.datetime]
last_completed: Optional[datetime.datetime] = None
last_triggered: Optional[datetime.datetime] = None
last_undo: Optional[datetime.datetime] = None
commands: List[str]
undo_allowed_duration: int

Expand Down

0 comments on commit f34a9b2

Please sign in to comment.