feat: remove VacuumEntityFeature.BATTERY from the vacuum entity (#1433)
Some checks failed
Tests / check-rule-format (push) Failing after 6s
Validate / validate-hassfest (push) Failing after 2s
Validate / validate-hacs (push) Failing after 15s
Validate / validate-lint (push) Failing after 1s
Validate / validate-setup (push) Failing after 4s

This commit is contained in:
Li Shuzhen
2025-10-10 16:31:02 +08:00
committed by GitHub
parent ec833b6539
commit 739998211e
2 changed files with 0 additions and 15 deletions

View File

@@ -167,11 +167,6 @@ SPEC_DEVICE_TRANS_MAP: dict = {
},
'battery': {
'required': {
'properties': {
'battery-level': {'read'}
}
},
'optional': {
'actions': {
'start-charge'
}

View File

@@ -90,7 +90,6 @@ class Vacuum(MIoTServiceEntity, StateVacuumEntity):
# pylint: disable=unused-argument
_prop_status: Optional[MIoTSpecProperty]
_prop_fan_level: Optional[MIoTSpecProperty]
_prop_battery_level: Optional[MIoTSpecProperty]
_prop_status_cleaning: Optional[list[int]]
_prop_status_docked: Optional[list[int]]
_prop_status_paused: Optional[list[int]]
@@ -117,7 +116,6 @@ class Vacuum(MIoTServiceEntity, StateVacuumEntity):
self._prop_status = None
self._prop_fan_level = None
self._prop_battery_level = None
self._prop_status_cleaning = []
self._prop_status_docked = []
self._prop_status_paused = []
@@ -180,9 +178,6 @@ class Vacuum(MIoTServiceEntity, StateVacuumEntity):
self._attr_fan_speed_list = list(self._fan_level_map.values())
self._attr_supported_features |= VacuumEntityFeature.FAN_SPEED
self._prop_fan_level = prop
elif prop.name == 'battery-level':
self._attr_supported_features |= VacuumEntityFeature.BATTERY
self._prop_battery_level = prop
# action
for action in entity_data.actions:
if action.name == 'start-sweep':
@@ -251,11 +246,6 @@ class Vacuum(MIoTServiceEntity, StateVacuumEntity):
"""Name of the vacuum entity."""
return self._device_name
@property
def battery_level(self) -> Optional[int]:
"""The current battery level of the vacuum cleaner."""
return self.get_prop_value(prop=self._prop_battery_level)
@property
def fan_speed(self) -> Optional[str]:
"""The current fan speed of the vacuum cleaner."""