Skip to content

Commit

Permalink
round battery_level
Browse files Browse the repository at this point in the history
  • Loading branch information
pilotak committed Jun 4, 2020
1 parent 1e6538b commit 45aee7d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions custom_components/attributes/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
| timestamp_custom('{2}') }}}}\
{{% else %}} {3} {{% endif %}}").format(
device, attr, time_format, STATE_UNKNOWN)
elif attr == "battery" or attr == "battery_level":
state_template = ("{{% if states('{0}') != '{2}' %}}\
{{{{ states.{0}.attributes['{1}'] | float }}}}\
{{% else %}} {2} {{% endif %}}").format(
device, attr, STATE_UNKNOWN)
else:
state_template = "{{% if states('{0}') != '{2}' %}}"

Expand Down

0 comments on commit 45aee7d

Please sign in to comment.