Expose tplink temperature sensor as measurement (#128640)

Add state_class=measurement to the temperature sensor, making it available for long-term statistics.
This commit is contained in:
Teemu R. 2024-10-21 23:39:56 +02:00 committed by GitHub
parent 55ae43ed03
commit 21095e80a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -112,6 +112,7 @@ SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
TPLinkSensorEntityDescription(
key="temperature",
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
),
)

View File

@ -546,7 +546,9 @@
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'capabilities': dict({
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,