1
mirror of https://github.com/home-assistant/core synced 2024-08-28 03:36:46 +02:00
ha-core/homeassistant/components/ws66i/models.py
Shawn Saenger 1d57626ff0
Incorporate various improvements for the ws66i integration (#71717)
* Improve readability and remove unused code

* Remove ws66i custom services. Scenes can be used instead.

* Unmute WS66i Zone when volume changes

* Raise CannotConnect instead of ConnectionError in validation method

* Move _verify_connection() method to module level
2022-05-29 18:33:33 +02:00

29 lines
550 B
Python

"""The ws66i integration models."""
from __future__ import annotations
from dataclasses import dataclass
from pyws66i import WS66i
from .coordinator import Ws66iDataUpdateCoordinator
@dataclass
class SourceRep:
"""Different representations of the amp sources."""
id_name: dict[int, str]
name_id: dict[str, int]
name_list: list[str]
@dataclass
class Ws66iData:
"""Data for the ws66i integration."""
host_ip: str
device: WS66i
sources: SourceRep
coordinator: Ws66iDataUpdateCoordinator
zones: list[int]