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

Fix compatibility with airwave gen1 #3

Merged
merged 1 commit into from
Nov 13, 2022

Conversation

igorbernstein
Copy link
Contributor

It seems like 'date_time' dict entry is not populated for v1 of the airwave, which causes _get_service_characteristics to throw an error. I'm not sure why this is the case or what the expectation is, but since the date_time entry is getting popped anyways, I figured that adding a condition guard is the quickest/easiest fix.

After this change I can import the sensor into home assistant, whereas prior to change adding the integration would fail with [homeassistant.components.airthings_ble.config_flow] Unknown error occurred from CC:78:AB:15:75:02: 'date_time'

It seems like 'date_time' dict entry is not populated for v1 of the airwave, which causes _get_service_characteristics to throw an error. I'm not sure why this is the case or what the expectation is, but since the date_time entry is getting popped anyways, I figured that adding a condition guard is the quickest/easiest fix.

After this change I can import the sensor into home assistant, whereas prior to change adding the integration would fail with `[homeassistant.components.airthings_ble.config_flow] Unknown error occurred from CC:78:AB:15:75:02: 'date_time'`
@magfro
Copy link

magfro commented Nov 10, 2022

Thanks @igorbernstein. This worked for me to fix the issue I reported over at home-assistant/core#81498.

@cjwazzy
Copy link

cjwazzy commented Nov 12, 2022

@vincegio would love to see this merge into the current main build.

@vincegio vincegio merged commit 1dea209 into Airthings:main Nov 13, 2022
@vincegio
Copy link
Collaborator

Thanks! I'll get it updated and creating a PR in core to bump the package as well.

vincegio pushed a commit that referenced this pull request Nov 13, 2022
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.

4 participants