Skip to content

Commit

Permalink
Handle devices reporting no audio support (Sky) (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Jan 4, 2025
1 parent 3dcffd1 commit 14688d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/demetriek/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class Range(DataClassORJSONMixin):
class Audio(DataClassORJSONMixin):
"""Object holding the audio state of an LaMetric device."""

volume: int
available: bool = True
volume: int | None
volume_limit: Range | None
volume_range: Range | None

Expand Down Expand Up @@ -197,6 +198,8 @@ class Model(DataClassORJSONMixin):
sound: SoundURL | Sound | None = None

class Config(BaseConfig):
"""Model configuration."""

omit_none = True


Expand Down

0 comments on commit 14688d8

Please sign in to comment.