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:
parent
b24aa24f6a
commit
9071946e87
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue