Add and use UNIT_VOLT constant (#33994)
* Add and use UNIT_VOLT constant * Run isort
This commit is contained in:
1 parent
32e87fc4c7
commit
04c4501455
22 files changed
+125
-64
No files matched your search
@@ -1,7 +1,12 @@
|
||||
"""Constants for the Solar-Log integration."""
|
||||
from datetime import timedelta
|
||||
|
||||
from homeassistant.const import ENERGY_KILO_WATT_HOUR, POWER_WATT, UNIT_PERCENTAGE
|
||||
from homeassistant.const import (
|
||||
ENERGY_KILO_WATT_HOUR,
|
||||
POWER_WATT,
|
||||
UNIT_PERCENTAGE,
|
||||
UNIT_VOLT,
|
||||
)
|
||||
|
||||
DOMAIN = "solarlog"
|
||||
|
||||
@@ -17,8 +22,8 @@ SENSOR_TYPES = {
|
||||
"time": ["TIME", "last update", None, "mdi:calendar-clock"],
|
||||
"power_ac": ["powerAC", "power AC", POWER_WATT, "mdi:solar-power"],
|
||||
"power_dc": ["powerDC", "power DC", POWER_WATT, "mdi:solar-power"],
|
||||
"voltage_ac": ["voltageAC", "voltage AC", "V", "mdi:flash"],
|
||||
"voltage_dc": ["voltageDC", "voltage DC", "V", "mdi:flash"],
|
||||
"voltage_ac": ["voltageAC", "voltage AC", UNIT_VOLT, "mdi:flash"],
|
||||
"voltage_dc": ["voltageDC", "voltage DC", UNIT_VOLT, "mdi:flash"],
|
||||
"yield_day": ["yieldDAY", "yield day", ENERGY_KILO_WATT_HOUR, "mdi:solar-power"],
|
||||
"yield_yesterday": [
|
||||
"yieldYESTERDAY",
|
||||
|
||||
Reference in new issue
Block a user