1 """Axis network device abstraction."""
3 from __future__
import annotations
5 from dataclasses
import dataclass
6 from typing
import Self
23 DEFAULT_STREAM_PROFILE,
31 """Represent a Axis config entry."""
46 """Option defining what stream profile camera platform should use."""
48 """Option defining minimum number of seconds to keep trigger high."""
50 """Option defining what video source camera platform should use."""
54 """Create object from config entry."""
55 config = config_entry.data
56 options = config_entry.options
59 protocol=config.get(CONF_PROTOCOL,
"http"),
60 host=config[CONF_HOST],
61 username=config[CONF_USERNAME],
62 password=config[CONF_PASSWORD],
63 port=config[CONF_PORT],
64 model=config[CONF_MODEL],
65 name=config[CONF_NAME],
66 stream_profile=options.get(CONF_STREAM_PROFILE, DEFAULT_STREAM_PROFILE),
67 trigger_time=options.get(CONF_TRIGGER_TIME, DEFAULT_TRIGGER_TIME),
68 video_source=options.get(CONF_VIDEO_SOURCE, DEFAULT_VIDEO_SOURCE),
Self from_config_entry(cls, ConfigEntry config_entry)