Use ENERGY_KILO_WATT_HOUR constant (#33962)

This commit is contained in:
springstan authored and GitHub committed 2020-04-10 20:21:29 +02:00
1 parent c3c4752fa5
commit 02c9e47db8
13 files changed
+132 -60

No files matched your search

+3 -1
View File
@@ -40,7 +40,9 @@ async def prometheus_client(loop, hass, hass_client):
sensor2.entity_id = "sensor.radio_energy"
await sensor2.async_update_ha_state()
sensor3 = DemoSensor(None, "Electricity price", 0.123, None, "SEK/kWh", None)
sensor3 = DemoSensor(
None, "Electricity price", 0.123, None, f"SEK/{ENERGY_KILO_WATT_HOUR}", None
)
sensor3.hass = hass
sensor3.entity_id = "sensor.electricity_price"
await sensor3.async_update_ha_state()