Set Protocol inheritance on EnergyPlatform (#89079)

This commit is contained in:
epenet 2023-03-03 11:57:41 +01:00 committed by GitHub
parent 699cc6c092
commit 9e6f869438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(