def name(self):
        """Return the name of the sensor."""
        with self._bt_interface.connect(self._mac) as connection:
            name = connection.read_handle(_HANDLE_READ_NAME)  # pylint: disable=no-member

        if not name:
            raise BluetoothBackendException("Could not read NAME using handle %s"
                                            " from Mi Temp sensor %s" % (hex(_HANDLE_READ_NAME), self._mac))
        return ''.join(chr(n) for n in name)
def name ( self ) : with self . _bt_interface . connect ( self . _mac ) as connection : name = connection . read_handle ( _HANDLE_READ_NAME ) if not name : raise BluetoothBackendException ( "Could not read NAME using handle %s" " from Mi Temp sensor %s" % ( hex ( _HANDLE_READ_NAME ) , self . _mac ) ) return '' . join ( chr ( n ) for n in name )
Return the name of the sensor.