From 0d09e37a38d5e23ee3c06f16d19f9c401c86fc11 Mon Sep 17 00:00:00 2001 From: Gareth Kendall <45214489+garethkendall@users.noreply.github.com> Date: Fri, 4 Oct 2019 19:46:32 +0100 Subject: [PATCH] Battery Tile Added a tile to show the battery value. --- .../zigbee-window-shade.src/zigbee-window-shade.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/devicetypes/smartthings/zigbee-window-shade.src/zigbee-window-shade.groovy b/devicetypes/smartthings/zigbee-window-shade.src/zigbee-window-shade.groovy index b3331d7945b..b05b80ed633 100755 --- a/devicetypes/smartthings/zigbee-window-shade.src/zigbee-window-shade.groovy +++ b/devicetypes/smartthings/zigbee-window-shade.src/zigbee-window-shade.groovy @@ -52,12 +52,15 @@ metadata { valueTile("shadeLevel", "device.level", width: 4, height: 1) { state "level", label: 'Shade is ${currentValue}% up', defaultState: true } + valueTile("batteryLevel", "device.battery", width: 2, height: 2) { + state "battery", label:'${currentValue}% battery', unit:"" + } controlTile("levelSliderControl", "device.level", "slider", width:2, height: 1, inactiveLabel: false) { state "level", action:"switch level.setLevel" } main "windowShade" - details(["windowShade", "contPause", "shadeLevel", "levelSliderControl", "refresh"]) + details(["windowShade", "contPause", "shadeLevel", "levelSliderControl", "refresh","batteryLevel"]) } } @@ -267,4 +270,4 @@ def isIkeaKadrilj() { def isIkeaFyrtur() { device.getDataValue("model") == "FYRTUR block-out roller blind" -} \ No newline at end of file +}