code: def write_aldb(self, mem_addr: int, mode: str, group: int, target,
                     data1=0x00, data2=0x00, data3=0x00):
          
          if isinstance(mode, str) and mode.lower() in ['c', 'r']:
              pass
          else:
              _LOGGER.error('Insteon link mode: %s', mode)
              raise ValueError("Mode must be 'c' or 'r'")
          if isinstance(group, int):
              pass
          else:
              raise ValueError("Group must be an integer")
  
          target_addr = Address(target)
  
          _LOGGER.debug('calling aldb write_record')
          self._aldb.write_record(mem_addr, mode, group, target_addr,
                                  data1, data2, data3)
          self._aldb.add_loaded_callback(self._aldb_loaded_callback)
docs: Write to the device All-Link Database.
  
          Parameters:
              Required:
              mode:   r - device is a responder of target
                      c - device is a controller of target
              group:  Link group
              target: Address of the other device
  
              Optional:
              data1:  Device dependant
              data2:  Device dependant
              data3:  Device dependant