core icon indicating copy to clipboard operation
core copied to clipboard

Purpleair integration pulls incorrect value for RSSI sensor

Open petep0p opened this issue 6 months ago • 3 comments

The problem

I'm using the Purpleair integration to pull data from my own sensor via their API. It appears that the integration is taking the value for one of the "Pressure" sensors and inputting it into the RSSI sensor instead of the correct field. If I run the sensor query manually from the CLI via curl, i can see the correct value for RSSI:

Image

However, within HA, it shows up as equivalent to the barometric pressure in hPa (that would be a really great signal, though!):

Image

I don't really know where to begin to try and fix this, but if anyone can point me in the right direction, i'd be most obliged!

What version of Home Assistant Core has the issue?

core-2025.5.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Purpleair

Link to integration documentation on our website

https://www.home-assistant.io/integrations/purpleair

Diagnostics information

No response

Example YAML snippet


Anything in the logs that might be useful for us?

I don't think there is any specific error associated with this issue. It's simply that the integration is taking the incorrect field to populate the sensor's value.

Additional information

No response

petep0p avatar Jun 09 '25 22:06 petep0p

Hey there @bachya, mind taking a look at this issue as it has been labeled with an integration (purpleair) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of purpleair can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign purpleair Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


purpleair documentation purpleair source (message by IssueLinks)

home-assistant[bot] avatar Jun 09 '25 22:06 home-assistant[bot]

@bachya i think i found the bug:

Image

petep0p avatar Jun 12 '25 21:06 petep0p

Does anyone know how i could get this fixed in lieu of the code maintainer doing it? (he seems to be MIA on the Purpleair integration). I know exactly where the bug is in the code on GitHub, but I don't know how to go about fixing it on my HA system, since it's a core component. If it were a custom component, I'd know where to look, but I don't know where the editable code for a core integration lives on the HA OS system.

Any pointers on that, or the right way to go about this via GitHub would be greatly appreciated! I'm not a developer, but i poke around a bit.

petep0p avatar Jun 15 '25 21:06 petep0p

OK, i've attempted to submit the correction myself, but it looks like the same person is the approver. I'm not sure if I've done everything correctly or not, as this is the first time i've attempted anything like this.

petep0p avatar Jul 22 '25 20:07 petep0p

Well, it seems i made a typo in my email address on my first pull request, so it completely failed it's checks and got blocked. I just got rid of it and started over. i think i've done it correctly this time - we'll see if this gets merged!

petep0p avatar Jul 25 '25 06:07 petep0p

Also, if someone somehow stumbles across this and wants to know where to modify these files on you HA system, you have to have enabled docker (by disabling protection mode), then you have to open a shell on the homeassistant docker container, and then you will find the file structure that matches this core repository (EDIT: it's in /usr/src/homeassistant/) You can navigate to the file you want to modify there.

keep in mind that changes you make won't survive a restart of that container (which is NOT the same thing as restarting home assistant - the container usually stays running in that case, so changes you make might seem persistent. at least until a full reboot or a restart of that specific container, or an update of the system that doesn't include your local changes.)

petep0p avatar Jul 25 '25 06:07 petep0p

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.