Hello, I’m very new to home assistant. I’m trying to integrate one of PurpleAir sensors into Home Assistant. Adding the integration, when I enter the required API key and select my location I get a red error message: Unexpected error.
The sensor shown on the PurpleAir map and I have cut and pasted the API key directly off the PurpleAir developer site. The key that I created is a read key.
If I understand you correctly, I would have to give up on using my PurpleAir sensor. The thing is I’m using the sensor inside so I don’t think AirNow will help me.
Thank you Glen for following up. The thing is I’m not really a programmer, I don’t know Python nor have I ever heard of the REST API. It sounds like you have it working. Would you be willing to write down a step by step tutorial? Perhaps you could start with what pecies need to be in place for this to work.
Did you move credits into the project you are using from PurpleAir’s API setup page? The key doesn’t work unless you move credits in. I was confused by the error in HA as well.
Now to the reason I came here – I can’t seem to get any data from the integration after I successfully got it up and running. All I get is state ‘unavailable’ for the PM2.5 data.
Update … a reboot with credits in my key seems to have fixed everything. However if the default auto-refresh is on, it will quickly gobble up credits. Since I was putting a small number of creds in the key to experiment, they ran out. When the integration parses the API for data and there’s no creds, the HA data goes to ‘unavailable’ instead of showing the last valid data point.
I just encountered this problem in switching from the 3rd party integration to the built-in one.
PurpleAir support saids they don’t want the API access to cost the sensor owners anything. Just call/email them and give them your API account name, and they’ll move your account off of billing, so your API requests won’t require any points. They said in the future, they’ll have a system in place that automatically adds points to sensor owner’s accounts, and then they’ll put those accounts back on billing, but as long as you’re only using it for HA, you shouldn’t run into a points issue.