Skip to content

Commit c08e195

Browse files
eithefabaff
authored andcommitted
Describe the state_topic setting for battery tracking using Owntracks (home-assistant#3322)
I wasn't sure what the /tablet/tablet section of the state_topic part meant so had to google a bit to figure it out. With this change, users will immediately understand what they should set as the topic.
1 parent 5eff55d commit c08e195

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/_cookbook/track_battery_level.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ The `else` part is used to have the sensor keep it's last state if the newest [i
3232

3333
### {% linkable_title Android and iOS Devices %}
3434

35-
While running the [Owntracks](/components/device_tracker.owntracks/) device tracker you can retrieve the battery level with a MQTT sensor.
35+
While running the [Owntracks](/components/device_tracker.owntracks/) device tracker you can retrieve the battery level with 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.
3636

3737
```yaml
3838
sensor:
3939
- platform: mqtt
40-
state_topic: "owntracks/tablet/tablet"
40+
state_topic: "owntracks/username/deviceid"
4141
name: "Battery Tablet"
4242
unit_of_measurement: "%"
4343
value_template: {% raw %}'{{ value_json.batt }}'{% endraw %}

0 commit comments

Comments
 (0)