mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 05:05:09 +02:00
Set Protocol inheritance on EnergyPlatform (#89079)
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user