from typing import Literal

from pydantic import Field

from .base import AttributesBase, StringBaseState


class WaterHeaterAttributes(AttributesBase):
    min_temp: float | None = Field(default=None)
    max_temp: float | None = Field(default=None)
    target_temp_step: float | None = Field(default=None)
    operation_list: list[str] | None = Field(default=None)
    current_temperature: float | None = Field(default=None)
    temperature: float | None = Field(default=None)
    target_temp_high: float | None = Field(default=None)
    target_temp_low: float | None = Field(default=None)
    operation_mode: str | None = Field(default=None)
    away_mode: str | None = Field(default=None)


class WaterHeaterState(StringBaseState):
    """Representation of a Home Assistant water_heater state.

    See: https://www.home-assistant.io/integrations/water_heater/
    """

    domain: Literal["water_heater"]

    attributes: WaterHeaterAttributes
