From d3143eb4d2b29b0fa073c2b7ccaa7170e3f85d8d Mon Sep 17 00:00:00 2001 From: garbled1 Date: Sat, 16 Oct 2021 06:54:29 -0700 Subject: [PATCH] Change this to pull in SensorEntity, I think this is right.. --- custom_components/ecowitt/sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/ecowitt/sensor.py b/custom_components/ecowitt/sensor.py index 6dabcc8..492c92e 100644 --- a/custom_components/ecowitt/sensor.py +++ b/custom_components/ecowitt/sensor.py @@ -4,6 +4,7 @@ from . import EcowittEntity, async_add_ecowitt_entities from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN +from homeassistant.components.sensor import SensorEntity from homeassistant.helpers.dispatcher import async_dispatcher_connect from .const import ( DOMAIN, @@ -35,7 +36,7 @@ def add_entities(discovery_info=None): add_entities(hass.data[DOMAIN][entry.entry_id][REG_ENTITIES][TYPE_SENSOR]) -class EcowittSensor(EcowittEntity): +class EcowittSensor(EcowittEntity, SensorEntity): def __init__(self, hass, entry, key, name, dc, uom, icon, sc): """Initialize the sensor."""