Skip to content

Commit

Permalink
Fix left over after renameing base station to station (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus authored Dec 23, 2024
1 parent abaa89b commit de64f8a
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 54 deletions.
6 changes: 3 additions & 3 deletions deebot_client/capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ class CapabilitySettings:


@dataclass(frozen=True, kw_only=True)
class CapabilityBaseStation:
"""Capabilities for the base station."""
class CapabilityStation:
"""Capabilities for the station."""

action: CapabilityExecuteTypes[StationAction]
auto_empty: CapabilitySetTypes[
Expand All @@ -237,7 +237,6 @@ class Capabilities(ABC):
device_type: DeviceType = field(kw_only=False)

availability: CapabilityEvent[AvailabilityEvent]
base_station: CapabilityBaseStation | None = None
battery: CapabilityEvent[BatteryEvent]
charge: CapabilityExecute[[]]
clean: CapabilityClean
Expand All @@ -252,6 +251,7 @@ class Capabilities(ABC):
play_sound: CapabilityExecute[[]]
settings: CapabilitySettings
state: CapabilityEvent[StateEvent]
station: CapabilityStation | None = None
stats: CapabilityStats
water: (
CapabilitySetTypes[WaterInfoEvent, [WaterAmount | str], WaterAmount] | None
Expand Down
2 changes: 1 addition & 1 deletion deebot_client/events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def from_xml(cls, value: str) -> LifeSpan:
STRAINER = "strainer", "Strainer"
HAND_FILTER = "handFilter", "HandFilter"
DUST_CASE_HEAP = "dustCaseHeap", "DustCaseHeap"
BASE_STATION_FILTER = "spHeap", "SpHeap"
STATION_FILTER = "spHeap", "SpHeap"


@dataclass(frozen=True)
Expand Down
32 changes: 16 additions & 16 deletions deebot_client/hardware/deebot/buom7k.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from deebot_client.capabilities import (
Capabilities,
CapabilityBaseStation,
CapabilityClean,
CapabilityCleanAction,
CapabilityCustomCommand,
Expand All @@ -17,6 +16,7 @@
CapabilitySetEnable,
CapabilitySettings,
CapabilitySetTypes,
CapabilityStation,
CapabilityStats,
DeviceType,
)
Expand Down Expand Up @@ -101,21 +101,6 @@
availability=CapabilityEvent(
AvailabilityEvent, [GetBattery(is_available_check=True)]
),
base_station=CapabilityBaseStation(
action=CapabilityExecuteTypes(
station_action.StationAction, types=(StationAction.EMPTY_DUSTBIN,)
),
auto_empty=CapabilitySetTypes(
event=AutoEmptyEvent,
get=[GetAutoEmpty()],
set=SetAutoEmpty,
types=(
auto_empty.Frequency.AUTO,
auto_empty.Frequency.SMART,
),
),
state=CapabilityEvent(StationEvent, [GetStationState()]),
),
battery=CapabilityEvent(BatteryEvent, [GetBattery()]),
charge=CapabilityExecute(Charge),
clean=CapabilityClean(
Expand Down Expand Up @@ -193,6 +178,21 @@
volume=CapabilitySet(VolumeEvent, [GetVolume()], SetVolume),
),
state=CapabilityEvent(StateEvent, [GetChargeState(), GetCleanInfoV2()]),
station=CapabilityStation(
action=CapabilityExecuteTypes(
station_action.StationAction, types=(StationAction.EMPTY_DUSTBIN,)
),
auto_empty=CapabilitySetTypes(
event=AutoEmptyEvent,
get=[GetAutoEmpty()],
set=SetAutoEmpty,
types=(
auto_empty.Frequency.AUTO,
auto_empty.Frequency.SMART,
),
),
state=CapabilityEvent(StationEvent, [GetStationState()]),
),
stats=CapabilityStats(
clean=CapabilityEvent(StatsEvent, [GetStats()]),
report=CapabilityEvent(ReportStatsEvent, []),
Expand Down
36 changes: 18 additions & 18 deletions deebot_client/hardware/deebot/p95mgv.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from deebot_client.capabilities import (
Capabilities,
CapabilityBaseStation,
CapabilityClean,
CapabilityCleanAction,
CapabilityCustomCommand,
Expand All @@ -17,6 +16,7 @@
CapabilitySetEnable,
CapabilitySettings,
CapabilitySetTypes,
CapabilityStation,
CapabilityStats,
DeviceType,
)
Expand Down Expand Up @@ -119,23 +119,6 @@
availability=CapabilityEvent(
AvailabilityEvent, [GetBattery(is_available_check=True)]
),
base_station=CapabilityBaseStation(
action=CapabilityExecuteTypes(
station_action.StationAction, types=(StationAction.EMPTY_DUSTBIN,)
),
auto_empty=CapabilitySetTypes(
event=auto_empty.AutoEmptyEvent,
get=[GetAutoEmpty()],
set=SetAutoEmpty,
types=(
auto_empty.Frequency.MIN_10,
auto_empty.Frequency.MIN_15,
auto_empty.Frequency.MIN_25,
auto_empty.Frequency.AUTO,
),
),
state=CapabilityEvent(StationEvent, [GetStationState()]),
),
battery=CapabilityEvent(BatteryEvent, [GetBattery()]),
charge=CapabilityExecute(Charge),
clean=CapabilityClean(
Expand Down Expand Up @@ -231,6 +214,23 @@
volume=CapabilitySet(VolumeEvent, [GetVolume()], SetVolume),
),
state=CapabilityEvent(StateEvent, [GetChargeState(), GetCleanInfo()]),
station=CapabilityStation(
action=CapabilityExecuteTypes(
station_action.StationAction, types=(StationAction.EMPTY_DUSTBIN,)
),
auto_empty=CapabilitySetTypes(
event=auto_empty.AutoEmptyEvent,
get=[GetAutoEmpty()],
set=SetAutoEmpty,
types=(
auto_empty.Frequency.MIN_10,
auto_empty.Frequency.MIN_15,
auto_empty.Frequency.MIN_25,
auto_empty.Frequency.AUTO,
),
),
state=CapabilityEvent(StationEvent, [GetStationState()]),
),
stats=CapabilityStats(
clean=CapabilityEvent(StatsEvent, [GetStats()]),
report=CapabilityEvent(ReportStatsEvent, []),
Expand Down
32 changes: 16 additions & 16 deletions deebot_client/hardware/deebot/qhe2o2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from deebot_client.capabilities import (
Capabilities,
CapabilityBaseStation,
CapabilityClean,
CapabilityCleanAction,
CapabilityCustomCommand,
Expand All @@ -17,6 +16,7 @@
CapabilitySetEnable,
CapabilitySettings,
CapabilitySetTypes,
CapabilityStation,
CapabilityStats,
DeviceType,
)
Expand Down Expand Up @@ -102,21 +102,6 @@
AvailabilityEvent, [GetBattery(is_available_check=True)]
),
battery=CapabilityEvent(BatteryEvent, [GetBattery()]),
base_station=CapabilityBaseStation(
action=CapabilityExecuteTypes(
station_action.StationAction, types=(StationAction.EMPTY_DUSTBIN,)
),
auto_empty=CapabilitySetTypes(
event=AutoEmptyEvent,
get=[GetAutoEmpty()],
set=SetAutoEmpty,
types=(
auto_empty.Frequency.AUTO,
auto_empty.Frequency.SMART,
),
),
state=CapabilityEvent(StationEvent, [GetStationState()]),
),
charge=CapabilityExecute(Charge),
clean=CapabilityClean(
action=CapabilityCleanAction(command=CleanV2, area=CleanAreaV2),
Expand Down Expand Up @@ -193,6 +178,21 @@
volume=CapabilitySet(VolumeEvent, [GetVolume()], SetVolume),
),
state=CapabilityEvent(StateEvent, [GetChargeState(), GetCleanInfoV2()]),
station=CapabilityStation(
action=CapabilityExecuteTypes(
station_action.StationAction, types=(StationAction.EMPTY_DUSTBIN,)
),
auto_empty=CapabilitySetTypes(
event=AutoEmptyEvent,
get=[GetAutoEmpty()],
set=SetAutoEmpty,
types=(
auto_empty.Frequency.AUTO,
auto_empty.Frequency.SMART,
),
),
state=CapabilityEvent(StationEvent, [GetStationState()]),
),
stats=CapabilityStats(
clean=CapabilityEvent(StatsEvent, [GetStats()]),
report=CapabilityEvent(ReportStatsEvent, []),
Expand Down

0 comments on commit de64f8a

Please sign in to comment.