def unlock(hass, entity_id=None, code=None):
 data = {}
 if code:
  data[ATTR_CODE] = code
 if entity_id:
  data[ATTR_ENTITY_ID] = entity_id
 hass.services.call(DOMAIN, SERVICE_UNLOCK, data)

def unlock ( hass , entity_id = None , code = None ) : data = { } if code : data [ ATTR_CODE ] = code if entity_id : data [ ATTR_ENTITY_ID ] = entity_id hass . services . call ( DOMAIN , SERVICE_UNLOCK , data )
remove lease from semaphore .