def write_value(self, value, offset=<NUM_LIT:0>):
bytes = [dbus.Byte(b) for b in value]<EOL>try:<EOL><INDENT>self._object.WriteValue(<EOL>bytes,<EOL>{'<STR_LIT>': dbus.UInt16(offset, variant_level=<NUM_LIT:1>)},<EOL>reply_handler=self._write_value_succeeded,<EOL>error_handler=self._write_value_failed,<EOL>dbus_interface='<STR_LIT>')<EOL><DEDENT>except dbus.exceptions.DBusException as e:<EOL><INDENT>self._write_value_failed(self, error=e)<EOL><DEDENT>
Attempts to write a value to the characteristic.

Success or failure will be notified by calls to `write_value_succeeded` or `write_value_failed` respectively.

:param value: array of bytes to be written
:param offset: offset from where to start writing the bytes (defaults to 0)