summaryrefslogtreecommitdiff
path: root/include/py/homekit/camera/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'include/py/homekit/camera/config.py')
-rw-r--r--include/py/homekit/camera/config.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/py/homekit/camera/config.py b/include/py/homekit/camera/config.py
index 9685cab..bcd5d07 100644
--- a/include/py/homekit/camera/config.py
+++ b/include/py/homekit/camera/config.py
@@ -44,7 +44,7 @@ class IpcamConfig(ConfigUnit):
}
}
},
- 'areas': {
+ 'zones': {
'type': 'dict',
'keysrules': {'type': 'string'},
'valuesrules': {
@@ -114,11 +114,14 @@ class IpcamConfig(ConfigUnit):
# FIXME
def get_all_cam_names(self,
filter_by_server: Optional[str] = None,
- filter_by_disk: Optional[int] = None) -> list[int]:
+ filter_by_disk: Optional[int] = None,
+ only_enabled=True) -> list[int]:
cams = []
if filter_by_server is not None and filter_by_server not in _lbc:
raise ValueError(f'invalid filter_by_server: {filter_by_server} not found in {_lbc.__class__.__name__}')
for cam, params in self['cameras'].items():
+ if only_enabled and not self.is_camera_enabled(cam):
+ continue
if filter_by_server is None or params['server'] == filter_by_server:
if filter_by_disk is None or params['disk'] == filter_by_disk:
cams.append(int(cam))