From ee3c084e935af2e87b171b7f61687ae4b17fb4c7 Mon Sep 17 00:00:00 2001 From: DewGew Date: Sun, 4 Feb 2024 17:23:13 +0100 Subject: [PATCH] check state Checks state if already in state --- modules/domoticz.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/domoticz.py b/modules/domoticz.py index bbe0165..cf18c5b 100644 --- a/modules/domoticz.py +++ b/modules/domoticz.py @@ -127,7 +127,8 @@ def getAog(device, user_id=None): aog.type = 'action.devices.types.SWITCH' if domain in ['DoorLock', 'DoorLockInverted']: aog.type = 'action.devices.types.LOCK' - + + aog.customData['check_state'] = True # Try to get device specific voice control configuration from Domoticz aog.customData['dzTags'] = False desc = getDesc(user_id, aog) @@ -147,6 +148,9 @@ def getAog(device, user_id=None): ack = desc.get('ack', False) if ack: aog.customData['acknowledge'] = ack + chkState = desc.get('check_state', True) + if not chkState: + aog.customData['check_State'] = chkState repState = desc.get('report_state', True) if not repState: aog.willReportState = repState