2021-06-27 12:05:04 +00:00
|
|
|
"""Models for the Forecast.Solar integration."""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
2021-09-29 14:15:36 +00:00
|
|
|
from collections.abc import Callable
|
2021-06-27 12:05:04 +00:00
|
|
|
from dataclasses import dataclass
|
2021-09-29 14:15:36 +00:00
|
|
|
from typing import Any
|
2021-07-21 22:04:30 +00:00
|
|
|
|
|
|
|
from forecast_solar.models import Estimate
|
2021-06-27 12:05:04 +00:00
|
|
|
|
2021-07-27 15:45:47 +00:00
|
|
|
from homeassistant.components.sensor import SensorEntityDescription
|
2021-06-27 12:05:04 +00:00
|
|
|
|
|
|
|
|
2021-07-27 15:45:47 +00:00
|
|
|
@dataclass
|
|
|
|
class ForecastSolarSensorEntityDescription(SensorEntityDescription):
|
|
|
|
"""Describes a Forecast.Solar Sensor."""
|
2021-06-27 12:05:04 +00:00
|
|
|
|
2021-07-21 22:04:30 +00:00
|
|
|
state: Callable[[Estimate], Any] | None = None
|