From b7f36106dffb05a4ec547917077679b82f9888be Mon Sep 17 00:00:00 2001 From: Simone Chemelli Date: Wed, 25 Nov 2020 15:37:07 +0100 Subject: [PATCH] Add Shelly UNI ADC sensor (#43490) --- homeassistant/components/shelly/sensor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/homeassistant/components/shelly/sensor.py b/homeassistant/components/shelly/sensor.py index 10d15fdd62f..f4dfd16aa25 100644 --- a/homeassistant/components/shelly/sensor.py +++ b/homeassistant/components/shelly/sensor.py @@ -158,6 +158,12 @@ SENSORS = { "Operational hours": round(block.totalWorkTime / 3600, 1) }, ), + ("adc", "adc"): BlockAttributeDescription( + name="ADC", + unit=VOLT, + value=lambda value: round(value, 1), + device_class=sensor.DEVICE_CLASS_VOLTAGE, + ), } REST_SENSORS = {