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
@@ -2,6 +2,7 @@
|
||||
import logging
|
||||
|
||||
from homeassistant.components.sensor import DOMAIN
|
||||
from homeassistant.const import UNIT_VOLT
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import assert_setup_component
|
||||
@@ -11,7 +12,7 @@ BASE_CFG = {
|
||||
"platform": "sma",
|
||||
"host": "1.1.1.1",
|
||||
"password": "",
|
||||
"custom": {"my_sensor": {"key": "1234567890123", "unit": "V"}},
|
||||
"custom": {"my_sensor": {"key": "1234567890123", "unit": UNIT_VOLT}},
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user