Update reference to HA app to reflect current version (#11360)

* Update attribute

Update `device tracker` attribute to reflect changes in iOS app with release of 2.0/2019

* Change known_devices.yaml example explanation

iOS App 2.0/2019 no long users `known_devices.yaml` so change explanation of example to something that does.

Reword

* Update notification example

Update example automation to reflect changes in in ios app (now used cross-platform domain `mobile_app`)

* Update to reference companion apps

The simplest solution to get battery level is with the companion apps so this should be made clear.

* Add android

We have an android app now 🎉
This commit is contained in:
Tom Brien 2019-12-04 11:05:20 +00:00 committed by Franck Nijhof
parent 6ae5b07fae
commit f8202c1a3e
5 changed files with 9 additions and 10 deletions

View File

@ -4,6 +4,9 @@ description: "Basic example how to track the battery level of your mobile device
ha_category: Automation Examples ha_category: Automation Examples
--- ---
### Android and iOS Devices
The [Home Assistant Companion Apps](https://companion.home-assistant.io/) for iOS and Android pass the current battery level to Home Assistant with every location update. The default name of the sensor used is `sensor.battery_level`.
### iOS Devices ### iOS Devices
If you have a device running iOS (iPhone, iPad, etc), The [iCloud](/integrations/icloud) integration is gathering various details about your device including the battery level. To display it in the Frontend use a [template sensor](/integrations/template). You can also use the `battery` [sensor device class](/integrations/sensor/#device-class) to dynamically change the icon with the battery level. If you have a device running iOS (iPhone, iPad, etc), The [iCloud](/integrations/icloud) integration is gathering various details about your device including the battery level. To display it in the Frontend use a [template sensor](/integrations/template). You can also use the `battery` [sensor device class](/integrations/sensor/#device-class) to dynamically change the icon with the battery level.
@ -26,10 +29,6 @@ sensor:
``` ```
{% endraw %} {% endraw %}
### Android and iOS Devices
While running the [Owntracks](/integrations/owntracks) device tracker you can retrieve the battery level.
How you achieve this depends on how you have configured your Owntracks instance.
#### MQTT #### MQTT
If you have configured Owntracks to send reports via MQTT you can use the received data via a MQTT sensor. If you have configured Owntracks to send reports via MQTT you can use the received data via a MQTT sensor.
Replace username with your MQTT username (for the embedded MQTT it's simply homeassistant), and deviceid with the set Device ID in Owntracks. Replace username with your MQTT username (for the embedded MQTT it's simply homeassistant), and deviceid with the set Device ID in Owntracks.
@ -48,7 +47,7 @@ sensor:
#### HTTP #### HTTP
If you have configured Owntracks to send reports to your Home Assistant instance via HTTP you can use a template sensor. If you have configured Owntracks to send reports to your Home Assistant instance via HTTP you can use a template sensor.
Replace `deviceid` with the set Device ID in Owntracks. Replace `deviceid` with the set Device ID in Owntracks.
{% raw %} {% raw %}

View File

@ -4,7 +4,7 @@ description: "Android/iOS instructions to add Home Assistant to your homescreen.
redirect_from: /getting-started/mobile/ redirect_from: /getting-started/mobile/
--- ---
Home Assistant has [a companion app for iOS](/docs/ecosystem/ios/). Home Assistant has [a companion apps for Android and iOS](/docs/ecosystem/ios/).
On both Android and iOS, you can add the Home Assistant "web app" to your homescreen as if it was native (Home Assistant leverages the W3C [manifest.json](https://w3c.github.io/manifest/) support). On both Android and iOS, you can add the Home Assistant "web app" to your homescreen as if it was native (Home Assistant leverages the W3C [manifest.json](https://w3c.github.io/manifest/) support).

View File

@ -206,7 +206,7 @@ The template condition will test if the [given template][template] renders a val
```yaml ```yaml
condition: condition:
condition: template condition: template
value_template: "{% raw %}{{ (state_attr('device_tracker.iphone', 'battery')|int) > 50 }}{% endraw %}" value_template: "{% raw %}{{ (state_attr('device_tracker.iphone', 'battery_level')|int) > 50 }}{% endraw %}"
``` ```
Within an automation, template conditions also have access to the `trigger` variable as [described here][automation-templating]. Within an automation, template conditions also have access to the `trigger` variable as [described here][automation-templating].

View File

@ -83,7 +83,7 @@ devicename:
<div class='note warning'> <div class='note warning'>
In the example above, `devicename` refers to the detected name of the device. For instance, `my_iphone`. In the example above, `devicename` refers to the detected name of the device. For example, with `nmap`, this will be the MAC address (with byte separators omitted).
</div> </div>

View File

@ -39,7 +39,7 @@ Both events have three attributes:
- **callsign**: Callsign of the flight. - **callsign**: Callsign of the flight.
- **altitude**: Altitude of the flight in meters. - **altitude**: Altitude of the flight in meters.
To receive notifications of the entering flights, add the following lines to your `configuration.yaml` file: To receive notifications of the entering flights using the [Home Assistant Companion App](https://companion.home-assistant.io/), add the following lines to your `configuration.yaml` file:
{% raw %} {% raw %}
```yaml ```yaml
@ -49,7 +49,7 @@ automation:
platform: event platform: event
event_type: opensky_entry event_type: opensky_entry
action: action:
service: notify.ios_YOURIPHONENAME service: notify.mobile_app_<device_name>
data_template: data_template:
message : 'Flight entry of {{ trigger.event.data.callsign }} ' message : 'Flight entry of {{ trigger.event.data.callsign }} '
``` ```