Skip to content

Commit

Permalink
check state
Browse files Browse the repository at this point in the history
Checks state if already in state
  • Loading branch information
DewGew authored Feb 4, 2024
1 parent e1eed48 commit ee3c084
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/domoticz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit ee3c084

Please sign in to comment.