Skip to content

Conversation

kanshurichard
Copy link

@kanshurichard kanshurichard commented Apr 3, 2025

Hi there 👋

This PR fixes an issue that prevented Broadlink A2 air quality sensors from returning correct data. The problem was due to an incorrectly formatted packet being sent to the device when requesting sensor readings.

I’ve updated the request packet structure so that the device now responds with valid and complete data. This includes temperature, humidity, and PM10/2.5/1. The fix has been tested on a real A2 unit (4f60) and is working as expected.

Thanks for your time and effort maintaining this project! Please let me know if anything needs adjustment.

Best regards,
Kan

Context

The Broadlink A2 air quality sensor was previously unable to return valid data because the library sent incorrectly formatted request packets to the device. As a result, the response was shown as Error -5.

Proposed change

Corrected the format of the packet sent to A2 devices when requesting sensor data. With this fix, the device responds with valid data that can be parsed as expected (temperature, humidity, air quality, etc.).

Type of change

  • Bugfix (non-breaking change which fixes an issue)

Additional information

  • This PR fixes issue: N/A (no open issue was created)
  • This PR is related to:
  • Link to documentation pull request: N/A

Checklist

  • The code change is tested and works locally.
  • The code has been formatted using Black.
  • The code follows the Zen of Python.
  • I am creating the Pull Request against the correct branch.
  • Documentation added/updated.

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

Successfully merging this pull request may close these issues.

1 participant