Why not use the battery you get from GET /devices?
Part of my test / play script
`curl -s -H “Authorization: Bearer $MINUTTOKEN” “https://api.minut.com/draft1/devices” | jq -r ‘.devices | map(.description, .battery.percent)’.
Also, for some automation purposes it could be useful to have the time when the last (heartbeat) update was recorded.
Yes, it’s been merged into dev and will be part of 0.83, but I don’t have an expected release date.
There should be very little that you need to do. If you are using the version with Integrations everything should just work. For the other versions you might need to reconfigure. I went from the first version posted and I had to re-authenticate but my old devices kept the device-ids and I got a whole bunch of new sensors .
Just followed the instructions but when I try to authenticate, after clicking ‘Accept’ on the Minut website I get a redirect to localhost which fails.
Any chance to tell me what I’m doing wrong?
That is strange, I’ve written the code to support multiple devices. I only have one myself though so it’s quite hard to debug what might be happening. You don’t see anything interesting in the logs?
I sent an IM with the log entries. ('Config entry has already been setup!' for all but the first point. Is the email used as identifier? Haven’t checked the code but perhaps a typo is omitting the differentiation of the subsequent registrations?)
The fixes for multiple Points reached 0.84 unfortunatly it introduced another issue (a stupid typo) so the sensors does not load correctly. I’ve submitted a fix for this and will keep you posted when the new version reaches the stable branch.
First of all thanks for integrating Minut Point into Home Assistant.
I’ve just configured my Point, and I struggled a bit, just like Sam_Van_Herzele did, so I thought I’ll post exactly what I did to get i working for future reference and aiding other Point users. All credit goes to fredrike, Sam_Van_Herzele, gaffe, and who else posted in this thread.
Step 3: After the reboot, Home Assistant has discovered your point, start configuring it by following the instructions. Leave the window with Home Assistant open.
Step 4: At some point you’ll be redirected to localhost:8000/point?code=RANDOM_TEXT&state=LONGER_RANDOM_TEXT which fails. BTW, it is by no means random Do not edit the anything after “code=”, instead replace “localhost:8000/point?” with "https://hassurl:8123/api/minut?". If succeeding, a file is downloaded. Note, it didn’t work in Firefox, I tried in MS Edge which worked perfectly fine.
Step 5: Back in Home Assistant, press “submit” and you are now good to go.
Are you sure you gave the right URL to Minut when creating the API-keys (you should have given them the url https://hassurl:8123/api/minut, as I tried to explain in the documentation:
To connect Point, you will have to sign up for a developer account and get a client_id and client_secret using the callback url as base_url + /api/minut eg. http://localhost:8123/api/minut . The client_id and client_secret should be used as below.
I really hope that we can get Cloud Authentication but according to @balloob it will take some time.
If the documentation can be made clearer please help and update it.