Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix left over after renameing base station to station #719

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading