mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Set Protocol inheritance on EnergyPlatform (#89079)
This commit is contained in:
parent
699cc6c092
commit
9e6f869438
@ -2,7 +2,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections.abc import Awaitable, Callable
|
from collections.abc import Awaitable, Callable
|
||||||
from typing import TypedDict
|
from typing import Protocol, TypedDict
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
@ -18,8 +18,8 @@ GetSolarForecastType = Callable[
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class EnergyPlatform:
|
class EnergyPlatform(Protocol):
|
||||||
"""This class represents the methods we expect on the energy platforms."""
|
"""Represents the methods we expect on the energy platforms."""
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
async def async_get_solar_forecast(
|
async def async_get_solar_forecast(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user