Remove % sign from Vera Battery Levels (#8069)

Vera devices are reporting battery levels as a sting by appending a
percentage sign (%) on the end.

To make the Vera component act like other Home Assistant components,
let's remove the percentage sign from the battery report levels so that
we only display the battery level.

This may be a "breaking change" if people are relying on the Vera
battery levels to be a string instead of an int. However, this will make
the battery level reports compatible with everything else.
This commit is contained in:
Phil Hawthorne 2017-06-17 18:38:15 +10:00 committed by Fabian Affolter
parent b24aa24f6a
commit 9071946e87

View file

@ -164,7 +164,7 @@ class VeraDevice(Entity):
attr = {}
if self.vera_device.has_battery:
attr[ATTR_BATTERY_LEVEL] = self.vera_device.battery_level + '%'
attr[ATTR_BATTERY_LEVEL] = self.vera_device.battery_level
if self.vera_device.is_armable:
armed = self.vera_device.is_armed