From d6b5f6f31e73f5da39b2670e462e24e7be6a820d Mon Sep 17 00:00:00 2001 From: Robert Resch Date: Mon, 23 Dec 2024 10:13:11 +0000 Subject: [PATCH] Fix left over after renameing base station to station --- deebot_client/capabilities.py | 6 ++--- deebot_client/events/__init__.py | 2 +- deebot_client/hardware/deebot/buom7k.py | 32 +++++++++++----------- deebot_client/hardware/deebot/p95mgv.py | 36 ++++++++++++------------- deebot_client/hardware/deebot/qhe2o2.py | 32 +++++++++++----------- 5 files changed, 54 insertions(+), 54 deletions(-) diff --git a/deebot_client/capabilities.py b/deebot_client/capabilities.py index 6a93c765..8efd0dc8 100644 --- a/deebot_client/capabilities.py +++ b/deebot_client/capabilities.py @@ -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[ @@ -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 @@ -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 diff --git a/deebot_client/events/__init__.py b/deebot_client/events/__init__.py index 74d636f6..03a93f0a 100644 --- a/deebot_client/events/__init__.py +++ b/deebot_client/events/__init__.py @@ -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) diff --git a/deebot_client/hardware/deebot/buom7k.py b/deebot_client/hardware/deebot/buom7k.py index 614850fe..9f8a186a 100644 --- a/deebot_client/hardware/deebot/buom7k.py +++ b/deebot_client/hardware/deebot/buom7k.py @@ -4,7 +4,6 @@ from deebot_client.capabilities import ( Capabilities, - CapabilityBaseStation, CapabilityClean, CapabilityCleanAction, CapabilityCustomCommand, @@ -17,6 +16,7 @@ CapabilitySetEnable, CapabilitySettings, CapabilitySetTypes, + CapabilityStation, CapabilityStats, DeviceType, ) @@ -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( @@ -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, []), diff --git a/deebot_client/hardware/deebot/p95mgv.py b/deebot_client/hardware/deebot/p95mgv.py index 660e44bb..8b0aeca8 100644 --- a/deebot_client/hardware/deebot/p95mgv.py +++ b/deebot_client/hardware/deebot/p95mgv.py @@ -4,7 +4,6 @@ from deebot_client.capabilities import ( Capabilities, - CapabilityBaseStation, CapabilityClean, CapabilityCleanAction, CapabilityCustomCommand, @@ -17,6 +16,7 @@ CapabilitySetEnable, CapabilitySettings, CapabilitySetTypes, + CapabilityStation, CapabilityStats, DeviceType, ) @@ -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( @@ -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, []), diff --git a/deebot_client/hardware/deebot/qhe2o2.py b/deebot_client/hardware/deebot/qhe2o2.py index 9ffda83d..c5d146f9 100644 --- a/deebot_client/hardware/deebot/qhe2o2.py +++ b/deebot_client/hardware/deebot/qhe2o2.py @@ -4,7 +4,6 @@ from deebot_client.capabilities import ( Capabilities, - CapabilityBaseStation, CapabilityClean, CapabilityCleanAction, CapabilityCustomCommand, @@ -17,6 +16,7 @@ CapabilitySetEnable, CapabilitySettings, CapabilitySetTypes, + CapabilityStation, CapabilityStats, DeviceType, ) @@ -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), @@ -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, []),