Home Assistant Unofficial Reference
2024.12.1
models.py
Go to the documentation of this file.
1
"""ONVIF models."""
2
3
from
__future__
import
annotations
4
5
from
dataclasses
import
dataclass
6
from
enum
import
Enum
7
from
typing
import
Any
8
9
from
homeassistant.const
import
EntityCategory
10
11
12
@dataclass
13
class
DeviceInfo
:
14
"""Represent device information."""
15
16
manufacturer: str |
None
=
None
17
model: str |
None
=
None
18
fw_version: str |
None
=
None
19
serial_number: str |
None
=
None
20
mac: str |
None
=
None
21
22
23
@dataclass
24
class
Resolution
:
25
"""Represent video resolution."""
26
27
width: int
28
height: int
29
30
31
@dataclass
32
class
Video
:
33
"""Represent video encoding settings."""
34
35
encoding: str
36
resolution: Resolution
37
38
39
@dataclass
40
class
PTZ
:
41
"""Represents PTZ configuration on a profile."""
42
43
continuous: bool
44
relative: bool
45
absolute: bool
46
presets: list[str] |
None
=
None
47
48
49
@dataclass
50
class
Profile
:
51
"""Represent a ONVIF Profile."""
52
53
index: int
54
token: str
55
name: str
56
video: Video
57
ptz: PTZ |
None
=
None
58
video_source_token: str |
None
=
None
59
60
61
@dataclass
62
class
Capabilities
:
63
"""Represents Service capabilities."""
64
65
snapshot: bool =
False
66
events: bool =
False
67
ptz: bool =
False
68
imaging: bool =
False
69
70
71
@dataclass
72
class
Event
:
73
"""Represents a ONVIF event."""
74
75
uid: str
76
name: str
77
platform: str
78
device_class: str |
None
=
None
79
unit_of_measurement: str |
None
=
None
80
value: Any =
None
81
entity_category: EntityCategory |
None
=
None
82
entity_enabled: bool =
True
83
84
85
class
PullPointManagerState
(Enum):
86
"""States for the pullpoint manager."""
87
88
STOPPED = 0
# Not running or not supported
89
STARTED = 1
# Running and renewing
90
PAUSED = 2
# Switched to webhook, but can resume
91
FAILED = 3
# Failed to do initial subscription
92
93
94
class
WebHookManagerState
(Enum):
95
"""States for the webhook manager."""
96
97
STOPPED = 0
98
STARTED = 1
99
FAILED = 2
# Failed to do initial subscription
homeassistant.components.onvif.models.Capabilities
Definition:
models.py:62
homeassistant.components.onvif.models.DeviceInfo
Definition:
models.py:13
homeassistant.components.onvif.models.Event
Definition:
models.py:72
homeassistant.components.onvif.models.PTZ
Definition:
models.py:40
homeassistant.components.onvif.models.Profile
Definition:
models.py:50
homeassistant.components.onvif.models.PullPointManagerState
Definition:
models.py:85
homeassistant.components.onvif.models.Resolution
Definition:
models.py:24
homeassistant.components.onvif.models.Video
Definition:
models.py:32
homeassistant.components.onvif.models.WebHookManagerState
Definition:
models.py:94
homeassistant.const
Definition:
const.py:1
core
homeassistant
components
onvif
models.py
Generated by
1.9.1