Add and use UNIT_VOLT constant (#33994)

* Add and use UNIT_VOLT constant

* Run isort
This commit is contained in:
springstan authored and GitHub committed 2020-04-11 02:04:58 +02:00
1 parent 32e87fc4c7
commit 04c4501455
22 files changed
+125 -64

No files matched your search

+3 -1
View File
@@ -7,6 +7,8 @@ from elkm1_lib.const import (
)
from elkm1_lib.util import pretty_const, username
from homeassistant.const import UNIT_VOLT
from . import ElkAttachedEntity, create_elk_entities
from .const import DOMAIN
@@ -195,7 +197,7 @@ class ElkZone(ElkSensor):
if self._element.definition == ZoneType.TEMPERATURE.value:
return self._temperature_unit
if self._element.definition == ZoneType.ANALOG_ZONE.value:
return "V"
return UNIT_VOLT
return None
def _element_changed(self, element, changeset):