Show battery_level as a percent vs a decimal (#18328)

This commit is contained in:
Chris Kacerguis authored and Anders Melchiorsen committed 2018-11-10 21:30:03 +01:00
1 parent f236e14bd6
commit 667b41dd4a
1 file changed
+1 -1
+1 -1
View File
@@ -271,7 +271,7 @@ class WirelessTagBaseSensor(Entity):
def device_state_attributes(self):
"""Return the state attributes."""
return {
ATTR_BATTERY_LEVEL: self._tag.battery_remaining,
ATTR_BATTERY_LEVEL: int(self._tag.battery_remaining*100),
ATTR_VOLTAGE: '{:.2f}V'.format(self._tag.battery_volts),
ATTR_TAG_SIGNAL_STRENGTH: '{}dBm'.format(
self._tag.signal_strength),