mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 06:35:10 +02:00
Add missing state_class and device_cass attributes to daikin sensors (#70317)
This commit is contained in:
@@ -87,6 +87,7 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
|||||||
key=ATTR_TOTAL_POWER,
|
key=ATTR_TOTAL_POWER,
|
||||||
name="Estimated Power Consumption",
|
name="Estimated Power Consumption",
|
||||||
device_class=SensorDeviceClass.POWER,
|
device_class=SensorDeviceClass.POWER,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=POWER_KILO_WATT,
|
native_unit_of_measurement=POWER_KILO_WATT,
|
||||||
value_func=lambda device: round(device.current_total_power_consumption, 2),
|
value_func=lambda device: round(device.current_total_power_consumption, 2),
|
||||||
),
|
),
|
||||||
@@ -110,6 +111,8 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
|||||||
key=ATTR_COMPRESSOR_FREQUENCY,
|
key=ATTR_COMPRESSOR_FREQUENCY,
|
||||||
name="Compressor Frequency",
|
name="Compressor Frequency",
|
||||||
icon="mdi:fan",
|
icon="mdi:fan",
|
||||||
|
device_class=SensorDeviceClass.FREQUENCY,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=FREQUENCY_HERTZ,
|
native_unit_of_measurement=FREQUENCY_HERTZ,
|
||||||
value_func=lambda device: device.compressor_frequency,
|
value_func=lambda device: device.compressor_frequency,
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user