rgerganov / py-air-control

Command line app for controlling Philips air purifiers
MIT License
256 stars 52 forks source link

Add debug option to HTTPAirClient. Set default to False #56

Closed GeorgeSG closed 3 years ago

GeorgeSG commented 3 years ago

I want to use pi-air-control in a custom Home Assistant component, wrapping it in asyncio. Home Assistant is complaining when it detects I/O in it's event loop.

This adds debug option to HTTPAirClient similar to CoAPAirClient. When debug is False, the client won't print.

For instances of HTTPAirClient debug defaults to False. For HTTPAirCli it defaults to True to preserve current behavior.

I suggest passing the debug value from args.debug to HTTPAirCli in the future, but that will change the current behavior.

rgerganov commented 3 years ago

Thanks for the PR. I am on vacation and will merge it next week.

rgerganov commented 3 years ago

Merged. Let me know if you want me to release a new version on PyPI with this.

GeorgeSG commented 3 years ago

@rgerganov thank you! And yes, a new version will be great :)

rgerganov commented 3 years ago

I have pushed v2.1.0 -- https://pypi.org/project/py-air-control/2.1.0/