Remove the battery feature from supported features (#150101)

This commit is contained in:
Wesley Vos
2025-08-11 23:26:27 +02:00
committed by GitHub
parent 93c30f1b59
commit 5605f5896a
3 changed files with 2 additions and 8 deletions

View File

@@ -51,11 +51,6 @@ class IRobotEntity(Entity):
"""Return the uniqueid of the vacuum cleaner."""
return self.robot_unique_id
@property
def battery_level(self):
"""Return the battery level of the vacuum cleaner."""
return self.vacuum_state.get("batPct")
@property
def run_stats(self):
"""Return the run stats."""

View File

@@ -35,7 +35,7 @@ SENSORS: list[RoombaSensorEntityDescription] = [
native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.BATTERY,
entity_category=EntityCategory.DIAGNOSTIC,
value_fn=lambda self: self.battery_level,
value_fn=lambda self: self.vacuum_state.get("batPct"),
),
RoombaSensorEntityDescription(
key="battery_cycles",

View File

@@ -24,8 +24,7 @@ from .entity import IRobotEntity
from .models import RoombaData
SUPPORT_IROBOT = (
VacuumEntityFeature.BATTERY
| VacuumEntityFeature.PAUSE
VacuumEntityFeature.PAUSE
| VacuumEntityFeature.RETURN_HOME
| VacuumEntityFeature.SEND_COMMAND
| VacuumEntityFeature.START