|
| None | __init__ (self, HomeAssistant hass, ProtectApiClient protect, timedelta update_interval, UFPConfigEntry entry) |
| |
| None | async_add_pending_camera_id (self, str camera_id) |
| |
| None | async_refresh (self) |
| |
| None | async_setup (self) |
| |
| None | async_stop (self, *Any args) |
| |
| CALLBACK_TYPE | async_subscribe (self, str mac, Callable[[ProtectDeviceType], None] update_callback) |
| |
| None | async_subscribe_adopt (self, Callable[[ProtectAdoptableDeviceModel], None] add_callback) |
| |
| bool | disable_stream (self) |
| |
| Generator[ProtectAdoptableDeviceModel] | get_by_types (self, Iterable[ModelType] device_types, bool ignore_unadopted=True) |
| |
| Generator[Camera] | get_cameras (self, bool ignore_unadopted=True) |
| |
| int | max_events (self) |
| |
|
| None | _async_add_device (self, ProtectAdoptableDeviceModel device) |
| |
| None | _async_poll (self, datetime now) |
| |
| None | _async_process_updates (self) |
| |
| None | _async_process_ws_message (self, WSSubscriptionMessage message) |
| |
| None | _async_remove_device (self, ProtectAdoptableDeviceModel device) |
| |
| None | _async_signal_device_update (self, ProtectDeviceType device) |
| |
| None | _async_unsubscribe (self, str mac, Callable[[ProtectDeviceType], None] update_callback) |
| |
| None | _async_update_change (self, bool success, bool force_update=False, Exception|None exception=None) |
| |
| None | _async_update_device (self, ProtectAdoptableDeviceModel|NVR device, dict[str, Any] changed_data) |
| |
| None | _async_websocket_state_changed (self, WebsocketState state) |
| |
Coordinate updates.
Definition at line 67 of file data.py.
◆ __init__()
| None homeassistant.components.unifiprotect.data.ProtectData.__init__ |
( |
|
self, |
|
|
HomeAssistant |
hass, |
|
|
ProtectApiClient |
protect, |
|
|
timedelta |
update_interval, |
|
|
UFPConfigEntry |
entry |
|
) |
| |
Initialize an subscriber.
Definition at line 70 of file data.py.
◆ _async_add_device()
| None homeassistant.components.unifiprotect.data.ProtectData._async_add_device |
( |
|
self, |
|
|
ProtectAdoptableDeviceModel |
device |
|
) |
| |
|
private |
◆ _async_poll()
| None homeassistant.components.unifiprotect.data.ProtectData._async_poll |
( |
|
self, |
|
|
datetime |
now |
|
) |
| |
|
private |
Poll the Protect API.
Definition at line 305 of file data.py.
◆ _async_process_updates()
| None homeassistant.components.unifiprotect.data.ProtectData._async_process_updates |
( |
|
self | ) |
|
|
private |
Process update from the protect data.
Definition at line 298 of file data.py.
◆ _async_process_ws_message()
| None homeassistant.components.unifiprotect.data.ProtectData._async_process_ws_message |
( |
|
self, |
|
|
WSSubscriptionMessage |
message |
|
) |
| |
|
private |
Process a message from the websocket.
Definition at line 252 of file data.py.
◆ _async_remove_device()
| None homeassistant.components.unifiprotect.data.ProtectData._async_remove_device |
( |
|
self, |
|
|
ProtectAdoptableDeviceModel |
device |
|
) |
| |
|
private |
◆ _async_signal_device_update()
| None homeassistant.components.unifiprotect.data.ProtectData._async_signal_device_update |
( |
|
self, |
|
|
ProtectDeviceType |
device |
|
) |
| |
|
private |
Call the callbacks for a device_id.
Definition at line 332 of file data.py.
◆ _async_unsubscribe()
| None homeassistant.components.unifiprotect.data.ProtectData._async_unsubscribe |
( |
|
self, |
|
|
str |
mac, |
|
|
Callable[[ProtectDeviceType], None]
|
update_callback |
|
) |
| |
|
private |
Remove a callback subscriber.
Definition at line 323 of file data.py.
◆ _async_update_change()
| None homeassistant.components.unifiprotect.data.ProtectData._async_update_change |
( |
|
self, |
|
|
bool |
success, |
|
|
bool |
force_update = False, |
|
|
Exception | None |
exception = None |
|
) |
| |
|
private |
Process a change in update success.
Definition at line 148 of file data.py.
◆ _async_update_device()
| None homeassistant.components.unifiprotect.data.ProtectData._async_update_device |
( |
|
self, |
|
|
ProtectAdoptableDeviceModel | NVR |
device, |
|
|
dict[str, Any]
|
changed_data |
|
) |
| |
|
private |
◆ _async_websocket_state_changed()
| None homeassistant.components.unifiprotect.data.ProtectData._async_websocket_state_changed |
( |
|
self, |
|
|
WebsocketState |
state |
|
) |
| |
|
private |
Handle a change in the websocket state.
Definition at line 144 of file data.py.
◆ async_add_pending_camera_id()
| None homeassistant.components.unifiprotect.data.ProtectData.async_add_pending_camera_id |
( |
|
self, |
|
|
str |
camera_id |
|
) |
| |
Add pending camera.
A "pending camera" is one that has been adopted by not had its camera channels
initialized yet. Will cause Websocket code to check for channels to be
initialized for the camera and issue a dispatch once they do.
Definition at line 198 of file data.py.
◆ async_refresh()
| None homeassistant.components.unifiprotect.data.ProtectData.async_refresh |
( |
|
self | ) |
|
Update the data.
Definition at line 179 of file data.py.
◆ async_setup()
| None homeassistant.components.unifiprotect.data.ProtectData.async_setup |
( |
|
self | ) |
|
Subscribe and do the refresh.
Definition at line 130 of file data.py.
◆ async_stop()
| None homeassistant.components.unifiprotect.data.ProtectData.async_stop |
( |
|
self, |
|
|
*Any |
args |
|
) |
| |
Stop processing data.
Definition at line 172 of file data.py.
◆ async_subscribe()
| CALLBACK_TYPE homeassistant.components.unifiprotect.data.ProtectData.async_subscribe |
( |
|
self, |
|
|
str |
mac, |
|
|
Callable[[ProtectDeviceType], None]
|
update_callback |
|
) |
| |
Add an callback subscriber.
Definition at line 315 of file data.py.
◆ async_subscribe_adopt()
| None homeassistant.components.unifiprotect.data.ProtectData.async_subscribe_adopt |
( |
|
self, |
|
|
Callable[[ProtectAdoptableDeviceModel], None]
|
add_callback |
|
) |
| |
Add an callback for on device adopt.
Definition at line 104 of file data.py.
◆ disable_stream()
| bool homeassistant.components.unifiprotect.data.ProtectData.disable_stream |
( |
|
self | ) |
|
Check if RTSP is disabled.
Definition at line 94 of file data.py.
◆ get_by_types()
| Generator[ProtectAdoptableDeviceModel] homeassistant.components.unifiprotect.data.ProtectData.get_by_types |
( |
|
self, |
|
|
Iterable[ModelType] |
device_types, |
|
|
bool |
ignore_unadopted = True |
|
) |
| |
Get all devices matching types.
Definition at line 112 of file data.py.
◆ get_cameras()
| Generator[Camera] homeassistant.components.unifiprotect.data.ProtectData.get_cameras |
( |
|
self, |
|
|
bool |
ignore_unadopted = True |
|
) |
| |
Get all cameras.
Definition at line 123 of file data.py.
◆ max_events()
| int homeassistant.components.unifiprotect.data.ProtectData.max_events |
( |
|
self | ) |
|
Max number of events to load at once.
Definition at line 99 of file data.py.
◆ _auth_failures
| homeassistant.components.unifiprotect.data.ProtectData._auth_failures |
|
private |
◆ _entry
| homeassistant.components.unifiprotect.data.ProtectData._entry |
|
private |
◆ _hass
| homeassistant.components.unifiprotect.data.ProtectData._hass |
|
private |
◆ _unsubs
| homeassistant.components.unifiprotect.data.ProtectData._unsubs |
|
private |
◆ _update_interval
| homeassistant.components.unifiprotect.data.ProtectData._update_interval |
|
private |
◆ add_signal
| homeassistant.components.unifiprotect.data.ProtectData.add_signal |
◆ adopt_signal
| homeassistant.components.unifiprotect.data.ProtectData.adopt_signal |
◆ api
| homeassistant.components.unifiprotect.data.ProtectData.api |
◆ channels_signal
| homeassistant.components.unifiprotect.data.ProtectData.channels_signal |
◆ last_update_success
| homeassistant.components.unifiprotect.data.ProtectData.last_update_success |
The documentation for this class was generated from the following file:
- core/homeassistant/components/unifiprotect/data.py