File: model.py

package info (click to toggle)
python-aiopvapi 3.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 684 kB
  • sloc: python: 3,123; xml: 850; makefile: 5
file content (24 lines) | stat: -rw-r--r-- 621 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""Powerview data models"""

from dataclasses import dataclass
from collections.abc import Iterable
from typing import Any
from aiopvapi.resources.shade import BaseShade
from aiopvapi.hub import Hub
from aiopvapi.resources.scene import Scene
from aiopvapi.resources.automation import Automation
from aiopvapi.resources.room import Room


@dataclass
class PowerviewData:
    """
    Powerview data in raw and processed form

    :raw - raw json from the hub

    :processed - Class Object grouped by id
    """

    raw: Iterable[dict[str | int, Any]]
    processed: dict[str, BaseShade | Hub | Automation | Scene | Room]