mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
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
@ -44,6 +44,14 @@ HEAT_METER_SENSOR_TYPES = (
|
|||||||
native_unit_of_measurement=ENERGY_MEGA_WATT_HOUR,
|
native_unit_of_measurement=ENERGY_MEGA_WATT_HOUR,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
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(
|
SensorEntityDescription(
|
||||||
key="volume_previous_year_m3",
|
key="volume_previous_year_m3",
|
||||||
icon="mdi:fire",
|
icon="mdi:fire",
|
||||||
|
@ -76,7 +76,7 @@ async def test_create_sensors(mock_heat_meter, hass):
|
|||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
# check if 26 attributes have been created
|
# 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)
|
entity_reg = entity_registry.async_get(hass)
|
||||||
|
|
||||||
state = hass.states.get("sensor.heat_meter_heat_usage")
|
state = hass.states.get("sensor.heat_meter_heat_usage")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user