mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Describe the state_topic setting for battery tracking using Owntracks (#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.
This commit is contained in:
parent
5eff55dcf0
commit
c08e19578a
@ -32,12 +32,12 @@ The `else` part is used to have the sensor keep it's last state if the newest [i
|
||||
|
||||
### {% linkable_title 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. Replace username with your MQTT username (for the embedded MQTT it's simply homeassistant), and deviceid with the set Device ID in Owntracks.
|
||||
|
||||
```yaml
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
state_topic: "owntracks/tablet/tablet"
|
||||
state_topic: "owntracks/username/deviceid"
|
||||
name: "Battery Tablet"
|
||||
unit_of_measurement: "%"
|
||||
value_template: {% raw %}'{{ value_json.batt }}'{% endraw %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user