Statistics sensors repect given name (#26119)

This commit is contained in:
Franck Nijhof authored and Paulus Schoutsen committed 2019-08-21 15:54:04 -07:00
1 parent f9e518d868
commit 12f964ca57
2 files changed
+9 -12

No files matched your search

@@ -82,10 +82,7 @@ class StatisticsSensor(Entity):
"""Initialize the Statistics sensor."""
self._entity_id = entity_id
self.is_binary = self._entity_id.split(".")[0] == "binary_sensor"
if not self.is_binary:
self._name = "{} {}".format(name, ATTR_MEAN)
else:
self._name = "{} {}".format(name, ATTR_COUNT)
self._name = name
self._sampling_size = sampling_size
self._max_age = max_age
self._precision = precision