bulldog5046 / ha_nespresso_integration

19 stars 4 forks source link

Error in Nespresso.py in 2024.04.01 #18

Open nxor opened 5 months ago

nxor commented 5 months ago

Error in onboard probably link to new python (2024.4.1)

I needed to remove the check for dbus_error

new code : async def onboard(self, client: BleakClient): try:

Write the txLevel to LOW

        await client.write_gatt_char(CHAR_UUID_PAIR, bytearray([1]), response=True)
        # Write the auth code
        await client.write_gatt_char(CHAR_UUID_AUTH, binascii.unhexlify(self.auth_code), response=True)
    except Exception as e:
        _LOGGER.error('Onboarding not permitted. Already paired?')