mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Use ENERGY_KILO_WATT_HOUR constant (#33962)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user