diff --git a/homeassistant/components/energy/data.py b/homeassistant/components/energy/data.py index d4533b2fcc8..d0da07da37c 100644 --- a/homeassistant/components/energy/data.py +++ b/homeassistant/components/energy/data.py @@ -136,6 +136,9 @@ class DeviceConsumption(TypedDict): # This is an ever increasing value stat_consumption: str + # An optional custom name for display in energy graphs + name: str | None + class EnergyPreferences(TypedDict): """Dictionary holding the energy data.""" @@ -287,6 +290,7 @@ ENERGY_SOURCE_SCHEMA = vol.All( DEVICE_CONSUMPTION_SCHEMA = vol.Schema( { vol.Required("stat_consumption"): str, + vol.Optional("name"): str, } )