gcobb321 / icloud3

iCloud3 v3 - iCloud3 is an advanced iDevice tracker that uses Apple iCloud account and HA Companion App data for presence detection and location based automations.
MIT License
581 stars 54 forks source link

Battery status not accurate on Apple Watch #217

Open amaisano opened 2 years ago

amaisano commented 2 years ago

I have forced my interval to be 1 minute for my integration, since I use my Apple Watch being placed on a charger as a trigger in Home Assistant for waking up and going to bed.

After the Watch has been on the dock for a while (I am assuming this happens once the Watch reaches 100% for the first time), it goes from Charged to NotCharging even though it's still connected to the dock and is indeed powered by the charger.

The iPhone battery status correctly reports this scenario by going from Charging to Full, but it seems the Apple Watch is constantly moving between Charged and NotCharging, which is impossible to smooth out/correct even with Node-Red.

Bonus: While charging, the Apple watch seems to constantly flip between Charging and Not Charging which also seems like a bug...

Is this a mistake/missed requirement in iCloud3 code or is the Apple Watch battery status just not programmed on the Apple side to detect being fully charged AND still sitting on a charger?

image

In the above pic there are three sensors:

  1. Raw value from iCloud3 device tracker attribute of Apple Watch
  2. Template binary sensor that groups Charging and Charged together as "on" (otherwise "off")
  3. A node-red version of the binary sensor that waits 3 minutes before updating due to the fluctuations you see
gcobb321 commented 2 years ago

The battery level and status is just picked up from the data retrieved from the iCloud account location information. iCloud3 doesn't do anything with it except display it.

amaisano commented 2 years ago

Hmm, and there is nothing we can do about it? Either via automations/HA, nor in the iCloud3 code?