Landis+Gyr Heat Meter: add heat previous year GJ as diagnostic (#78690)
Add heat previous year GJ as diagnostic
This commit is contained in:
parent
e360a4fa9e
commit
9ee81fdd77
2 changed files with 9 additions and 1 deletions
|
@ -44,6 +44,14 @@ HEAT_METER_SENSOR_TYPES = (
|
|||
native_unit_of_measurement=ENERGY_MEGA_WATT_HOUR,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
# Diagnostic entity for debugging, this will match the value in GJ of previous year indicated on the meter's display
|
||||
SensorEntityDescription(
|
||||
key="heat_previous_year_gj",
|
||||
icon="mdi:fire",
|
||||
name="Heat previous year GJ",
|
||||
native_unit_of_measurement="GJ",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="volume_previous_year_m3",
|
||||
icon="mdi:fire",
|
||||
|
|
|
@ -76,7 +76,7 @@ async def test_create_sensors(mock_heat_meter, hass):
|
|||
await hass.async_block_till_done()
|
||||
|
||||
# check if 26 attributes have been created
|
||||
assert len(hass.states.async_all()) == 26
|
||||
assert len(hass.states.async_all()) == 27
|
||||
entity_reg = entity_registry.async_get(hass)
|
||||
|
||||
state = hass.states.get("sensor.heat_meter_heat_usage")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue