diff --git a/modules/domoticz.py b/modules/domoticz.py index 47a1c14..b14998c 100644 --- a/modules/domoticz.py +++ b/modules/domoticz.py @@ -37,6 +37,8 @@ def getDomain(device): devs = devs.replace(" ", "") devs = devs.replace("/", "") devs = devs.replace("+", "") + if device["UsedByCamera"] == True: + devs = 'Camera' return devs @@ -181,7 +183,7 @@ def getAog(device, user_id=None): hide = desc.get('hide', False) if hide: domain = domain + '_Hidden' - + aog.customData['idx'] = device.get('idx') aog.customData['domain'] = domain aog.customData['protected'] = device.get('Protected') @@ -344,6 +346,8 @@ def getAog(device, user_id=None): if domain == 'Doorbell': aog.type = 'action.devices.types.DOORBELL' aog.traits.append('action.devices.traits.ObjectDetection') + if device.get('CameraIdx'): + aog.customData['cameraIdx'] = device.get('CameraIdx') aog.traits.append('action.devices.traits.CameraStream') aog.attributes = { 'cameraStreamSupportedProtocols': [ diff --git a/templates/dashboard.html b/templates/dashboard.html index 4351f02..113bbd1 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -836,7 +836,7 @@
Other devices (not supported devices) unknown_2 Not available @@ -906,7 +906,7 @@
Other devices (not supported devices) i").toggleClass('bi bi-chevron-compact-up') {% elif (v['customData']['domain'] not in ( 'SmokeDetector', 'Security', 'VenetianBlindsEU', 'OnOff', 'VenetianBlindsUS', 'Doorbell', 'DoorLock', 'DoorLockInverted', 'DoorContact', 'BlindsStop', 'BlindsPercentage', - 'MotionSensor', 'PushOnButton', 'PushOffButton', 'Contact') and 'Hidden' not in v['customData']['domain']) %} + 'MotionSensor', 'PushOnButton', 'PushOffButton', 'Contact', 'Camera') and 'Hidden' not in v['customData']['domain']) %} updateOthers_block.push("{{ v['customData']['idx'] }}") $('#title_other').show() {% else %}