diff --git a/homeassistant/components/energy/types.py b/homeassistant/components/energy/types.py index 9a599cb9a59..819ed6ac5a8 100644 --- a/homeassistant/components/energy/types.py +++ b/homeassistant/components/energy/types.py @@ -2,7 +2,7 @@ from __future__ import annotations from collections.abc import Awaitable, Callable -from typing import TypedDict +from typing import Protocol, TypedDict from homeassistant.core import HomeAssistant @@ -18,8 +18,8 @@ GetSolarForecastType = Callable[ ] -class EnergyPlatform: - """This class represents the methods we expect on the energy platforms.""" +class EnergyPlatform(Protocol): + """Represents the methods we expect on the energy platforms.""" @staticmethod async def async_get_solar_forecast(