Mark Yoto battery sensors as diagnostic

https://claude.ai/code/session_015G3sygJ3js3qaMvw7Kn2Jo
This commit is contained in:
Claude
2026-06-12 13:44:51 +00:00
parent fc60d48a17
commit 091b3d8d41
4 changed files with 4 additions and 2 deletions
@@ -31,6 +31,7 @@ BINARY_SENSORS: tuple[YotoBinarySensorEntityDescription, ...] = (
YotoBinarySensorEntityDescription(
key="charging",
device_class=BinarySensorDeviceClass.BATTERY_CHARGING,
entity_category=EntityCategory.DIAGNOSTIC,
is_on_fn=lambda player: player.status.is_charging,
),
YotoBinarySensorEntityDescription(
+1
View File
@@ -47,6 +47,7 @@ SENSORS: tuple[YotoSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.BATTERY,
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
value_fn=lambda player: player.status.battery_level_percentage,
),
YotoSensorEntityDescription(
@@ -114,7 +114,7 @@
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.nursery_yoto_charging',
'has_entity_name': True,
'hidden_by': None,
@@ -14,7 +14,7 @@
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'sensor.nursery_yoto_battery',
'has_entity_name': True,
'hidden_by': None,