From 552265bc310107eeee43093b49553727c1a4bade Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 10 Oct 2016 19:38:20 +0200 Subject: [PATCH] No longer use old name (#3792) --- homeassistant/components/sensor/statistics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/sensor/statistics.py b/homeassistant/components/sensor/statistics.py index 0c413ab9263..6e75c105ec3 100644 --- a/homeassistant/components/sensor/statistics.py +++ b/homeassistant/components/sensor/statistics.py @@ -74,7 +74,7 @@ class StatisticsSensor(Entity): self.min = self.max = self.total = self.count = 0 self.update() - def calculate_sensor_state_listener(entity, old_state, new_state): + def stats_sensor_state_listener(entity, old_state, new_state): """Called when the sensor changes state.""" self._unit_of_measurement = new_state.attributes.get( ATTR_UNIT_OF_MEASUREMENT) @@ -87,7 +87,7 @@ class StatisticsSensor(Entity): self.update_ha_state(True) - track_state_change(hass, entity_id, calculate_sensor_state_listener) + track_state_change(hass, entity_id, stats_sensor_state_listener) @property def name(self):