mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add unit and state_class to heating sensor in ista EcoTrend (#120728)
* Add unit and state_class to heating sensor * remove constant
This commit is contained in:
parent
6286177041
commit
540da3cac6
@ -56,6 +56,8 @@ SENSOR_DESCRIPTIONS: tuple[IstaSensorEntityDescription, ...] = (
|
||||
translation_key=IstaSensorEntity.HEATING,
|
||||
suggested_display_precision=0,
|
||||
consumption_type=IstaConsumptionType.HEATING,
|
||||
native_unit_of_measurement="units",
|
||||
state_class=SensorStateClass.TOTAL,
|
||||
),
|
||||
IstaSensorEntityDescription(
|
||||
key=IstaSensorEntity.HEATING_ENERGY,
|
||||
|
@ -64,7 +64,9 @@
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.TOTAL: 'total'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
@ -92,13 +94,15 @@
|
||||
'supported_features': 0,
|
||||
'translation_key': <IstaSensorEntity.HEATING: 'heating'>,
|
||||
'unique_id': 'eaf5c5c8-889f-4a3c-b68c-e9a676505762_heating',
|
||||
'unit_of_measurement': None,
|
||||
'unit_of_measurement': 'units',
|
||||
})
|
||||
# ---
|
||||
# name: test_setup[sensor.bahnhofsstr_1a_heating-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Bahnhofsstr. 1A Heating',
|
||||
'state_class': <SensorStateClass.TOTAL: 'total'>,
|
||||
'unit_of_measurement': 'units',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.bahnhofsstr_1a_heating',
|
||||
@ -491,7 +495,9 @@
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.TOTAL: 'total'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
@ -519,13 +525,15 @@
|
||||
'supported_features': 0,
|
||||
'translation_key': <IstaSensorEntity.HEATING: 'heating'>,
|
||||
'unique_id': '26e93f1a-c828-11ea-87d0-0242ac130003_heating',
|
||||
'unit_of_measurement': None,
|
||||
'unit_of_measurement': 'units',
|
||||
})
|
||||
# ---
|
||||
# name: test_setup[sensor.luxemburger_str_1_heating-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Luxemburger Str. 1 Heating',
|
||||
'state_class': <SensorStateClass.TOTAL: 'total'>,
|
||||
'unit_of_measurement': 'units',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.luxemburger_str_1_heating',
|
||||
|
Loading…
x
Reference in New Issue
Block a user