Hi, I’m new with HA. I saw a tutorial about sending your battery level to HA by using tasker.
I can send it, no problem, but however HA recognize my state as unknown…
When I click on my card, it shows a graph with the right values…
What I did was, in tasker I gave this data:
{“state”:"%BATT", “attributes”: {“friendly_name”: “Phone Battery”, “icon”:“mdi:watch”,“unit_of_measurement”:"%"}}
And in my configuration.yaml, I used a template sensor:
sensor:
I have my iPhone 6’s battery tracked by Owntracks and MQTT (not using Tasker so I’m not sure if I can be of any help), but this is what my setup looks like:
This is what my code looks like within the sensors section:
well, i basically have to set owntracks as “significant changes mode” otherwise this just drains the battery in a heartbeat…
so looking at the owntracks documentation, it only updates if it sees a position change of over >500m and max. one time in 5min.
So at home when your phone is laying there (no move of 500m) it wont update…
I was using iCloud before…but since there is a bug in that one, i switched over to owntracks.
Hope the iCloud presence detection is fixed soon