From 20ddd092f67cb83b18189b90ac371993ed9cc0a3 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 21 Sep 2021 00:14:33 +0200 Subject: [PATCH] Remove xiaomi_aqara entity_description property (#56456) --- homeassistant/components/xiaomi_aqara/sensor.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/homeassistant/components/xiaomi_aqara/sensor.py b/homeassistant/components/xiaomi_aqara/sensor.py index df86ef0fe77..3935f4fdc57 100644 --- a/homeassistant/components/xiaomi_aqara/sensor.py +++ b/homeassistant/components/xiaomi_aqara/sensor.py @@ -1,7 +1,6 @@ """Support for Xiaomi Aqara sensors.""" from __future__ import annotations -from functools import cached_property import logging from homeassistant.components.sensor import SensorEntity, SensorEntityDescription @@ -154,13 +153,9 @@ class XiaomiSensor(XiaomiDevice, SensorEntity): def __init__(self, device, name, data_key, xiaomi_hub, config_entry): """Initialize the XiaomiSensor.""" self._data_key = data_key + self.entity_description = SENSOR_TYPES[data_key] super().__init__(device, name, xiaomi_hub, config_entry) - @cached_property - def entity_description(self) -> SensorEntityDescription: # type: ignore[override] - """Return entity_description for data_key.""" - return SENSOR_TYPES[self._data_key] - def parse_data(self, data, raw_data): """Parse data sent by gateway.""" value = data.get(self._data_key)