Skip to content

Commit

Permalink
Allow empty capabilities (#293)
Browse files Browse the repository at this point in the history
Fixes #281
  • Loading branch information
Orhideous authored Apr 1, 2024
1 parent 0d058c4 commit a6da692
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion roombapy/roomba_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from mashumaro import field_options
from mashumaro.mixins.orjson import DataClassORJSONMixin

Capabilities = dict[str, int] | None


@dataclass
class RoombaInfo(DataClassORJSONMixin):
Expand All @@ -19,7 +21,7 @@ class RoombaInfo(DataClassORJSONMixin):
mac: str
robot_name: str = field(metadata=field_options(alias="robotname"))
sku: str
capabilities: dict[str, int] = field(metadata=field_options(alias="cap"))
capabilities: Capabilities = field(metadata=field_options(alias="cap"))
password: str | None = None

@cached_property
Expand Down

0 comments on commit a6da692

Please sign in to comment.