Skip to content

Commit

Permalink
add next_trigger_at, end_trigger, end_trigger_event to Trigger, add t…
Browse files Browse the repository at this point in the history
…ime to TriggerDetails (#96)
  • Loading branch information
Leggin authored Sep 24, 2024
1 parent cf93a62 commit 6b7d01d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/dirigera/devices/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ class Info(BaseIkeaModel):
icon: Icon


class EndTriggerEvent(BaseIkeaModel):
type: str
trigger: TriggerDetails


class Trigger(BaseIkeaModel):
id: Optional[str] = (
None # Optional to allow creation of Trigger instances for create_scene()
Expand All @@ -70,10 +75,14 @@ class Trigger(BaseIkeaModel):
triggered_at: Optional[datetime.datetime] = None
disabled: bool
trigger: Optional[TriggerDetails] = None
next_trigger_at: Optional[datetime.datetime] = None
end_trigger: Optional[EndTriggerEvent] = None
end_trigger_event: Optional[EndTriggerEvent] = None


class TriggerDetails(BaseIkeaModel):
days: Optional[List[str]] = None
time: Optional[str] = None
controllerType: Optional[ControllerType] = None
buttonIndex: Optional[int] = None
clickPattern: Optional[ClickPattern] = None
Expand Down

0 comments on commit 6b7d01d

Please sign in to comment.