mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
Fix iOS icon calculation to return mdi:battery for levels above 95
This commit is contained in:
@@ -96,7 +96,7 @@ class IOSSensor(Entity):
|
|||||||
elif battery_state == ios.ATTR_BATTERY_STATE_UNPLUGGED:
|
elif battery_state == ios.ATTR_BATTERY_STATE_UNPLUGGED:
|
||||||
if rounded_level < 10:
|
if rounded_level < 10:
|
||||||
returning_icon = "{}-outline".format(DEFAULT_ICON)
|
returning_icon = "{}-outline".format(DEFAULT_ICON)
|
||||||
elif battery_level == 100:
|
elif battery_level > 95:
|
||||||
returning_icon = DEFAULT_ICON
|
returning_icon = DEFAULT_ICON
|
||||||
else:
|
else:
|
||||||
returning_icon = "{}-{}".format(DEFAULT_ICON,
|
returning_icon = "{}-{}".format(DEFAULT_ICON,
|
||||||
|
Reference in New Issue
Block a user