File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -425,12 +425,13 @@ async def set_switch_state(
425425 switch_id = item .attrib ["id" ]
426426
427427 uri = f"{ APPLIANCES } ;id={ appl_id } /{ switch .device } ;id={ switch_id } "
428- lock_blocked = self .gw_entities [appl_id ]["switches" ].get ("lock" )
429- LOGGER .debug ("HOI lock_blocked=%s" , lock_blocked )
430- if model == "relay" and lock_blocked :
428+ if model == "relay" :
429+ lock_blocked = self .gw_entities [appl_id ]["switches" ].get ("lock" )
430+ LOGGER .debug ("HOI lock_blocked=%s" , lock_blocked )
431+ if lock_blocked or lock_blocked is None :
431432 # Don't switch a relay when its corresponding lock-state is true or no
432433 # lock is present. That means the relay can't be controlled by the user.
433- return current_state
434+ return current_state
434435
435436 await self .call_request (uri , method = "put" , data = data )
436437 return requested_state
You can’t perform that action at this time.
0 commit comments