Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error, NoneType logged after every update #285

Open
kiptonk opened this issue Jan 3, 2025 · 0 comments
Open

Error, NoneType logged after every update #285

kiptonk opened this issue Jan 3, 2025 · 0 comments

Comments

@kiptonk
Copy link

kiptonk commented Jan 3, 2025

Whenever I call Switchbot.update(), press(), or turn_on() it logs the following twice:

No advertisement data to update
NoneType: None

I traced it to here:

if not self._sb_adv_data:
_LOGGER.exception("No advertisement data to update")
return

But I'm not sure of the fix. There is a failed check on advertising data but that seems intentional because of:

class SwitchbotDeviceOverrideStateDuringConnection(SwitchbotBaseDevice):
"""Base Representation of a Switchbot Device.
This base class ignores the advertisement data during connection and uses the
data from the device instead.
"""

The return of None and Logger.exception() seem erroneous but maybe something higher up is the better fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant