From 124ab31f22fc0be0bff719f0d7a033b896c33cad Mon Sep 17 00:00:00 2001 From: Trevor North Date: Mon, 6 Feb 2023 23:46:06 +0000 Subject: [PATCH] Fix shelly dimmer current sensor device class (#4385) fixes https://github.com/esphome/issues/issues/4086 --- esphome/components/shelly_dimmer/light.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/components/shelly_dimmer/light.py b/esphome/components/shelly_dimmer/light.py index 9050a872b1..20e0e8156b 100644 --- a/esphome/components/shelly_dimmer/light.py +++ b/esphome/components/shelly_dimmer/light.py @@ -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.