1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 04:50:05 +00:00

Add HVAC modes of climate entities to Prometheus exporter (#62144)

This commit is contained in:
Renat Nurgaliyev
2022-01-19 14:49:29 +01:00
committed by GitHub
parent 8e835df8d4
commit d11f2b5151
2 changed files with 30 additions and 1 deletions

View File

@@ -419,7 +419,7 @@ async def test_battery(hass, hass_client):
async def test_climate(hass, hass_client):
"""Test prometheus metrics for battery."""
"""Test prometheus metrics for climate."""
assert await async_setup_component(
hass,
"conversation",
@@ -459,6 +459,20 @@ async def test_climate(hass, hass_client):
'friendly_name="Ecobee"} 24.0' in body
)
assert (
'climate_mode{domain="climate",'
'entity="climate.heatpump",'
'friendly_name="HeatPump",'
'mode="heat"} 1.0' in body
)
assert (
'climate_mode{domain="climate",'
'entity="climate.heatpump",'
'friendly_name="HeatPump",'
'mode="off"} 0.0' in body
)
async def test_humidifier(hass, hass_client):
"""Test prometheus metrics for battery."""