diff --git a/components/vacuum.xiaomi_miio/index.html b/components/vacuum.xiaomi_miio/index.html
index 0c4143d02f..7213a97a96 100644
--- a/components/vacuum.xiaomi_miio/index.html
+++ b/components/vacuum.xiaomi_miio/index.html
@@ -311,32 +311,12 @@ easily via a hidden menu item at the Mi-Home app.
To fetch the token follow these instructions depending on your mobile phone platform.
- Configure the robot with the Mi-Home app.
+ - Download and extract the MiToolKit.zip.
- Enable developer mode and USB debugging on the Android phone and plug it into the computer.
- - Get and install the ADB tool for Windows.
- - Create a backup of the application
com.xiaomi.smarthome
:
- $ adb backup -noapk com.xiaomi.smarthome -f backup.ab
-
-
-
- - If you have this message: “More than one device or emulator”, use this command to list all devices:
-
-
and execute this command:
- $ adb -s DEVICEID backup -noapk com.xiaomi.smarthome -f backup.ab # (with DEVICEID the device id from the previous command)
-
-
-
- - On the phone, you must confirm the backup. DO NOT enter any password and press button to make the backup.
- - Get and install ADB Backup Extractor.
- - Extract All files from the backup:
-
$ java.exe -jar ../android-backup-extractor/abe.jar unpack backup.ab backup.tar ""
-
-
-
- - Unzip the “.tar” file.
- - Open the SQLite database
miio2.db
with a tool like SQLite Manager extension for FireFox.
- - Get the token from “devicerecord” table.
+ - Change the MiToolKit language to English if you need to.
+ - Click “Extract Token”
+ - On the phone, you must confirm the backup. DO NOT enter any password and press the button to make the backup.
+ - Once you have confirmed the backup the token extraction will begin, it should appear in the MiToolKit shortly.
Linux and Android (rooted!)
Follow the pairing process using your phone and Mi-Home app. You will be able to retrieve the token from a SQLite file inside your phone.
diff --git a/cookbook/track_battery_level/index.html b/cookbook/track_battery_level/index.html
index 8c3f64a1d4..7a4e38e298 100644
--- a/cookbook/track_battery_level/index.html
+++ b/cookbook/track_battery_level/index.html
@@ -75,11 +75,14 @@
iOS Devices
-If you have a device running iOS (iPhone, iPad, etc), The iCloud is gathering various details about your device including the battery level. To display it in the Frontend use a template sensor.
+If you have a device running iOS (iPhone, iPad, etc), The iCloud is gathering various details about your device including the battery level. To display it in the Frontend use a template sensor. You can also use the icon template option to create a dynamic icon that changes with the battery level.
sensor:
- platform: template
sensors:
battery_iphone:
+ friendly_name: iPhone Battery
+ # "entity_id:" ensures that this sensor will only update when your device tracker does.
+ entity_id: device_tracker.iphone
unit_of_measurement: '%'
value_template: >-
{%- if states.device_tracker.iphone.attributes.battery %}
@@ -87,6 +90,16 @@
{% else %}
{{ states.sensor.battery_iphone.state }}
{%- endif %}
+ icon_template: >
+ {% set battery_level = states.sensor.battery_iphone.state|default(0)|int %}
+ {% set battery_round = (battery_level / 10) |int * 10 %}
+ {% if battery_round >= 100 %}
+ mdi:battery
+ {% elif battery_round > 0 %}
+ mdi:battery-{{ battery_round }}
+ {% else %}
+ mdi:battery-alert
+ {% endif %}
The else
part is used to have the sensor keep it’s last state if the newest iCloud update doesn’t have any battery state in it (which happens sometimes). Otherwise the sensor will be blank.
diff --git a/sitemap.xml b/sitemap.xml
index 1cf88d64e9..348313cd57 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -3542,7 +3542,7 @@
https://home-assistant.io/components/switch.hook/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/cookbook/automation_for_rainy_days/
@@ -4210,99 +4210,99 @@
https://home-assistant.io/docs/autostart/init.d/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/api/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/configuration/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/example_apps/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/installation/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/operation/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/reboot/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/running/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/tutorial/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/updating/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/windows/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/certificates/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/hadashboard/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/hass-configurator/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/ios/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/nginx/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/notebooks/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/scenegen/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/ecosystem/synology/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/tools/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/tools/dev-tools/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/tools/hass/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/docs/tools/scripts/
-2017-10-30T17:26:33+00:00
+2017-10-30T21:04:31+00:00
https://home-assistant.io/faq/after-upgrading/
@@ -5384,62 +5384,62 @@
https://home-assistant.io/demo/frontend.html
-2017-10-30T17:25:40+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/demo/index.html
-2017-10-30T17:25:40+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-event.html
-2017-10-30T17:25:40+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-info.html
-2017-10-30T17:25:40+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-service.html
-2017-10-30T17:25:40+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-state.html
-2017-10-30T17:25:40+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-template.html
-2017-10-30T17:25:40+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/demo/panels/ha-panel-history.html
-2017-10-30T17:25:40+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/demo/panels/ha-panel-iframe.html
-2017-10-30T17:25:40+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/demo/panels/ha-panel-logbook.html
-2017-10-30T17:25:40+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/demo/panels/ha-panel-map.html
-2017-10-30T17:25:40+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/googlef4f3693c209fe788.html
-2017-10-30T17:25:40+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html
-2017-10-30T17:25:41+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html
-2017-10-30T17:25:41+00:00
+2017-10-30T21:03:42+00:00
https://home-assistant.io/static/mdi-demo.html
-2017-10-30T17:25:41+00:00
+2017-10-30T21:03:42+00:00