Home Assistant Unofficial Reference 2024.12.1
sensor_entity_description.py
Go to the documentation of this file.
1 """Sensor Entity Description for the Growatt integration."""
2 
3 from __future__ import annotations
4 
5 from dataclasses import dataclass
6 
7 from homeassistant.components.sensor import SensorEntityDescription
8 
9 
10 @dataclass(frozen=True)
12  """Mixin for required keys."""
13 
14  api_key: str
15 
16 
17 @dataclass(frozen=True)
19  """Describes Growatt sensor entity."""
20 
21  precision: int | None = None
22  currency: bool = False
23  previous_value_drop_threshold: float | None = None
24  never_resets: bool = False