From 0cf676d50158687e52b1107422fae1a50ef1935e Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Wed, 25 Jan 2023 12:17:33 +0100 Subject: [PATCH] Remove unnecessary ZHA AnalogInput sensors for Xiaomi plugs (#86261) * Remove unnecessary ZHA AnalogInput sensors for Xiaomi plugs * Remove AnalogInput entities from test --- homeassistant/components/zha/sensor.py | 6 ------ tests/components/zha/zha_devices_list.py | 12 ------------ 2 files changed, 18 deletions(-) diff --git a/homeassistant/components/zha/sensor.py b/homeassistant/components/zha/sensor.py index 75fd9f4d188..bd6161cbb13 100644 --- a/homeassistant/components/zha/sensor.py +++ b/homeassistant/components/zha/sensor.py @@ -185,12 +185,6 @@ class Sensor(ZhaEntity, SensorEntity): return round(float(value * self._multiplier) / self._divisor) -@MULTI_MATCH( - channel_names=CHANNEL_ANALOG_INPUT, - manufacturers="LUMI", - models={"lumi.plug", "lumi.plug.maus01", "lumi.plug.mmeu01"}, - stop_on_match_group=CHANNEL_ANALOG_INPUT, -) @MULTI_MATCH( channel_names=CHANNEL_ANALOG_INPUT, manufacturers="Digi", diff --git a/tests/components/zha/zha_devices_list.py b/tests/components/zha/zha_devices_list.py index caa3da9ceef..412007126e6 100644 --- a/tests/components/zha/zha_devices_list.py +++ b/tests/components/zha/zha_devices_list.py @@ -2245,8 +2245,6 @@ DEVICES = [ "sensor.lumi_lumi_plug_maus01_rms_voltage", "sensor.lumi_lumi_plug_maus01_ac_frequency", "sensor.lumi_lumi_plug_maus01_power_factor", - "sensor.lumi_lumi_plug_maus01_analoginput", - "sensor.lumi_lumi_plug_maus01_analoginput_2", "binary_sensor.lumi_lumi_plug_maus01_binaryinput", "switch.lumi_lumi_plug_maus01_switch", "sensor.lumi_lumi_plug_maus01_rssi", @@ -2309,16 +2307,6 @@ DEVICES = [ DEV_SIG_ENT_MAP_CLASS: "LQISensor", DEV_SIG_ENT_MAP_ID: "sensor.lumi_lumi_plug_maus01_lqi", }, - ("sensor", "00:11:22:33:44:55:66:77-2-12"): { - DEV_SIG_CHANNELS: ["analog_input"], - DEV_SIG_ENT_MAP_CLASS: "AnalogInput", - DEV_SIG_ENT_MAP_ID: "sensor.lumi_lumi_plug_maus01_analoginput", - }, - ("sensor", "00:11:22:33:44:55:66:77-3-12"): { - DEV_SIG_CHANNELS: ["analog_input"], - DEV_SIG_ENT_MAP_CLASS: "AnalogInput", - DEV_SIG_ENT_MAP_ID: "sensor.lumi_lumi_plug_maus01_analoginput_2", - }, ("binary_sensor", "00:11:22:33:44:55:66:77-100-15"): { DEV_SIG_CHANNELS: ["binary_input"], DEV_SIG_ENT_MAP_CLASS: "BinaryInput",