From 4ed67987d6b45a87f6e331e821005b3752c43d73 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:45:42 -0400 Subject: [PATCH] Added sensor batteries to MQTT smartthings integration --- sensors/batteries.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sensors/batteries.yaml b/sensors/batteries.yaml index 2b0c3c6..107ab2e 100644 --- a/sensors/batteries.yaml +++ b/sensors/batteries.yaml @@ -18,3 +18,21 @@ {{ states.sensor.kat_iphone_batt.state }} {%- endif %} icon_template: '{%- if is_state("sensor.kat_iphone_batt", "unknown") %}mdi:battery-unknown{%- elif is_state_attr("device_tracker.katherinestonesiphone", "battery_status", "Charging") %}mdi:battery-charging{%- elif states.device_tracker.katherinestonesiphone.attributes.battery <= 5 %}mdi:battery-outline{%- elif states.device_tracker.katherinestonesiphone.attributes.battery >= 95 %}mdi:battery{% else %}mdi:battery-{{(states.device_tracker.katherinestonesiphone.attributes.battery|float / 10)|round*10}}{%- endif %}' +- platform: mqtt + name: "Front Door Battery" + state_topic: "smartthings/Front Door/battery" +- platform: mqtt + name: "Laundry Door Battery" + state_topic: "smartthings/Laundry Room Door/battery" +- platform: mqtt + name: "Kitchen Smoke Battery" + state_topic: "smartthings/Kitchen Smoke/battery" +- platform: mqtt + name: "Attic Door Battery" + state_topic: "smartthings/Attic Door/battery" +- platform: mqtt + name: "Washer Door Battery" + state_topic: "smartthings/Washer Door/battery" +- platform: mqtt + name: "Back Door Battery" + state_topic: "smartthings/Back Door/battery" \ No newline at end of file