1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-31 12:44:04 +01:00
Files
Zoltán Farkasdi d89bcd83d9 netatmo: bump pyatmo v9.4.0 (#169735)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2026-05-06 09:16:22 +02:00

29 lines
633 B
Python

"""Helper for Netatmo integration."""
from dataclasses import dataclass
from uuid import UUID, uuid4
from pyatmo.modules.device_types import DeviceType as NetatmoDeviceType
def device_type_to_str(device_type: NetatmoDeviceType) -> str:
"""Convert a device type to a string.
Used to generate backwards compatible unique ids.
"""
return f"{type(device_type).__name__}.{device_type}"
@dataclass
class NetatmoArea:
"""Class for keeping track of an area."""
area_name: str
lat_ne: float
lon_ne: float
lat_sw: float
lon_sw: float
mode: str
show_on_map: bool
uuid: UUID = uuid4()