Add Landis+Gyr missing device class (#90182)

Add missing device class for heat_previous_year_gj
pull/90187/head
Vincent Knoop Pathuis 2023-03-23 17:21:21 +01:00 committed by GitHub
parent 73ed6e039a
commit cb578c71e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -77,6 +77,7 @@ HEAT_METER_SENSOR_TYPES = (
icon="mdi:fire",
name="Heat previous year GJ",
native_unit_of_measurement=UnitOfEnergy.GIGA_JOULE,
device_class=SensorDeviceClass.ENERGY,
entity_category=EntityCategory.DIAGNOSTIC,
value_fn=lambda res: getattr(res, "heat_previous_year_gj", None),
),

View File

@ -31,6 +31,7 @@
}),
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Heat Meter Heat previous year GJ',
'icon': 'mdi:fire',
'unit_of_measurement': <UnitOfEnergy.GIGA_JOULE: 'GJ'>,