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

@@ -1,6 +1,6 @@
"""Definitions for DSMR Reader sensors added to MQTT."""
from homeassistant.const import ENERGY_KILO_WATT_HOUR, VOLUME_CUBIC_METERS
from homeassistant.const import ENERGY_KILO_WATT_HOUR, UNIT_VOLT, VOLUME_CUBIC_METERS
def dsmr_transform(value):
@@ -86,17 +86,17 @@ DEFINITIONS = {
"dsmr/reading/phase_voltage_l1": {
"name": "Current voltage L1",
"icon": "mdi:flash",
"unit": "V",
"unit": UNIT_VOLT,
},
"dsmr/reading/phase_voltage_l2": {
"name": "Current voltage L2",
"icon": "mdi:flash",
"unit": "V",
"unit": UNIT_VOLT,
},
"dsmr/reading/phase_voltage_l3": {
"name": "Current voltage L3",
"icon": "mdi:flash",
"unit": "V",
"unit": UNIT_VOLT,
},
"dsmr/consumption/gas/delivered": {
"name": "Gas usage",