mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
Add total cycles sensor for Litter-Robot (#147435)
* Add total cycles sensor for Litter-Robot * Add translatable unit of measurement cycles
This commit is contained in:
@@ -46,6 +46,9 @@
|
||||
"motor_fault_short": "mdi:flash-off",
|
||||
"motor_ot_amps": "mdi:flash-alert"
|
||||
}
|
||||
},
|
||||
"total_cycles": {
|
||||
"default": "mdi:counter"
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
|
@@ -115,6 +115,14 @@ ROBOT_SENSOR_MAP: dict[type[Robot], list[RobotSensorEntityDescription]] = {
|
||||
lambda robot: status.lower() if (status := robot.status_code) else None
|
||||
),
|
||||
),
|
||||
RobotSensorEntityDescription[LitterRobot](
|
||||
key="total_cycles",
|
||||
translation_key="total_cycles",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
entity_registry_enabled_default=False,
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
value_fn=lambda robot: robot.cycle_count,
|
||||
),
|
||||
],
|
||||
LitterRobot4: [
|
||||
RobotSensorEntityDescription[LitterRobot4](
|
||||
|
@@ -118,6 +118,10 @@
|
||||
"spf": "Pinch detect at startup"
|
||||
}
|
||||
},
|
||||
"total_cycles": {
|
||||
"name": "Total cycles",
|
||||
"unit_of_measurement": "cycles"
|
||||
},
|
||||
"waste_drawer": {
|
||||
"name": "Waste drawer"
|
||||
}
|
||||
|
Reference in New Issue
Block a user