diff --git a/modules/domoticz.py b/modules/domoticz.py index 83b9879..ffe538f 100644 --- a/modules/domoticz.py +++ b/modules/domoticz.py @@ -26,7 +26,7 @@ def __init__(self): def getDomain(device): - if device["Type"] in ['Color Switch', 'Group', 'Scene', 'Temp', 'Thermostat', 'Setpoint', 'Temp + Humidity', 'Temp + Humidity + Baro']: + if device["Type"] in ['Color Switch', 'Group', 'Scene', 'Temp', 'Thermostat', 'Setpoint', 'Temp + Humidity', 'Temp + Humidity + Baro', 'Security']: devs = device["Type"].replace(" ", "") devs = devs.replace("+", "") return devs diff --git a/modules/intents.py b/modules/intents.py index 9d2b1c4..f0f7908 100644 --- a/modules/intents.py +++ b/modules/intents.py @@ -109,7 +109,7 @@ def execute(self, user_id, commands, requestId): states['online'] = True action_result = {'ids': [device['id']], 'status': 'SUCCESS', 'states': states} response['commands'].append(action_result) - print(response) + except SmartHomeErrorNoChallenge as err: action_failed = {'ids': [device['id']], 'status': 'ERROR', 'errorCode': err.code, 'challengeNeeded': {'type': err.desc}} @@ -124,8 +124,9 @@ def execute(self, user_id, commands, requestId): if repstate.report_state_enabled(): - data = {'states': {device['id']: action_result['states']}} - self.statereport(requestId, user_id, data) + if 'Doorbell' not in device['id'] and 'Camera' not in device['id']: + data = {'states': {device['id']: action_result['states']}} + self.statereport(requestId, user_id, data) # if "followUpToken" in params and 'DoorLock' in custom_data['domain']: # ndata = {'states':{},'notifications':{}}