mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Fix shelly dimmer current sensor device class (#4385)
fixes https://github.com/esphome/issues/issues/4086
This commit is contained in:
parent
1b66fa5004
commit
124ab31f22
1 changed files with 2 additions and 1 deletions
|
@ -22,6 +22,7 @@ from esphome.const import (
|
|||
UNIT_WATT,
|
||||
DEVICE_CLASS_POWER,
|
||||
DEVICE_CLASS_VOLTAGE,
|
||||
DEVICE_CLASS_CURRENT,
|
||||
)
|
||||
from esphome.core import HexInt, CORE
|
||||
|
||||
|
@ -169,7 +170,7 @@ CONFIG_SCHEMA = (
|
|||
),
|
||||
cv.Optional(CONF_CURRENT): sensor.sensor_schema(
|
||||
unit_of_measurement=UNIT_AMPERE,
|
||||
device_class=DEVICE_CLASS_POWER,
|
||||
device_class=DEVICE_CLASS_CURRENT,
|
||||
accuracy_decimals=2,
|
||||
),
|
||||
# Change the default gamma_correct setting.
|
||||
|
|
Loading…
Reference in a new issue