mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 23:41:48 -05:00
Mark Yoto battery sensors as diagnostic
https://claude.ai/code/session_015G3sygJ3js3qaMvw7Kn2Jo
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user