mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Update track_battery_level.markdown (#878)
This commit is contained in:
parent
f7d0ee4c62
commit
41fdcaff5c
@ -10,7 +10,9 @@ footer: true
|
|||||||
ha_category: Automation Examples
|
ha_category: Automation Examples
|
||||||
---
|
---
|
||||||
|
|
||||||
The [iCloud](/components/device_tracker.icloud/) is gathering various details about your device including the battery level. To display it in the Frontend use a [template sensor](/components/sensor.template/).
|
iOS Devices
|
||||||
|
|
||||||
|
If you have a device running iOS (iPhone, iPad, etc), The [iCloud](/components/device_tracker.icloud/) is gathering various details about your device including the battery level. To display it in the Frontend use a [template sensor](/components/sensor.template/).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- platform: template
|
- platform: template
|
||||||
@ -27,6 +29,8 @@ The [iCloud](/components/device_tracker.icloud/) is gathering various details ab
|
|||||||
|
|
||||||
The `else` part is used to have the sensor keep it's last state if the newest [iCloud](/components/device_tracker.icloud/) update doesn't have any battery state in it (which happens sometimes). Otherwise the sensor will be blank.
|
The `else` part is used to have the sensor keep it's last state if the newest [iCloud](/components/device_tracker.icloud/) update doesn't have any battery state in it (which happens sometimes). Otherwise the sensor will be blank.
|
||||||
|
|
||||||
|
Android and iOS Devices
|
||||||
|
|
||||||
While running the [Owntracks](/components/device_tracker.owntracks/) device tracker you can retrieve the battery level with a MQTT sensor.
|
While running the [Owntracks](/components/device_tracker.owntracks/) device tracker you can retrieve the battery level with a MQTT sensor.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user