mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +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 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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user