File: models.py

package info (click to toggle)
python-aioskybell 23.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 304 kB
  • sloc: python: 1,422; makefile: 22
file content (101 lines) | stat: -rw-r--r-- 1,983 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
"""Models for Skybell."""
from __future__ import annotations

from datetime import datetime


class InfoDict(dict):
    """Class for info."""

    address: str
    checkedInAt: str
    clientId: str
    deviceId: str
    essid: str
    firmwareVersion: str
    hardwareRevision: str
    localHostname: str
    mac: str
    port: str
    proxy_address: str
    proxy_port: str
    region: str
    serialNo: str
    status: dict[str, str]
    timestamp: str
    wifiBitrate: str
    wifiLinkQuality: str
    wifiNoise: str
    wifiSignalLevel: str
    wifiTxPwrEeprom: str


class DeviceDict(dict):
    """Class for device."""

    acl: str
    createdAt: str
    deviceInviteToken: str
    id: str
    location: dict[str, str]
    name: str
    resourceId: str
    status: str
    type: str
    updatedAt: str
    user: str
    uuid: str


class AvatarDict(dict):
    """Class for avatar."""

    createdAt: str
    url: str


class SettingsDict(dict):
    """Class for settings."""

    chime_level: str | None
    digital_doorbell: str | None
    do_not_disturb: str | None
    do_not_ring: str | None
    green_b: str | None
    green_g: str | None
    green_r: str | None
    high_front_led_dac: str | None
    high_lux_threshold: str | None
    led_intensity: str | None
    low_front_led_dac: str | None
    low_lux_threshold: str | None
    med_front_led_dac: str | None
    med_lux_threshold: str | None
    mic_volume: str | None
    motion_policy: str | None
    motion_threshold: str | None
    ring_tone: str | None
    speaker_volume: str | None
    video_profile: str | None


class EventDict(dict):
    """Class for an event."""

    _id: str
    callId: str
    createdAt: datetime
    device: str
    event: str
    id: str
    media: str
    mediaSmall: str
    state: str
    ttlStartDate: str
    updatedAt: str
    videoState: str


EventTypeDict = dict[str, EventDict]
DeviceTypeDict = dict[str, dict[str, EventTypeDict]]
DevicesDict = dict[str, DeviceTypeDict]