From 45aee7daf1e27fb7d784659b3132de100f8855b7 Mon Sep 17 00:00:00 2001 From: Pavel Slama Date: Thu, 4 Jun 2020 13:31:58 +0200 Subject: [PATCH] round battery_level --- custom_components/attributes/sensor.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/custom_components/attributes/sensor.py b/custom_components/attributes/sensor.py index 4dbcc3f..d3f1edd 100644 --- a/custom_components/attributes/sensor.py +++ b/custom_components/attributes/sensor.py @@ -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}' %}}"