From 92e625636a12bf3cda940fe1c675f6fd61a7e029 Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Fri, 20 Oct 2023 08:15:37 +0200 Subject: [PATCH] Fix ZHA `power_factor` attribute not initialized (#102133) --- .../components/zha/core/cluster_handlers/homeautomation.py | 1 + tests/components/zha/zha_devices_list.py | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/homeassistant/components/zha/core/cluster_handlers/homeautomation.py b/homeassistant/components/zha/core/cluster_handlers/homeautomation.py index 8ca014f453e..a379db54dac 100644 --- a/homeassistant/components/zha/core/cluster_handlers/homeautomation.py +++ b/homeassistant/components/zha/core/cluster_handlers/homeautomation.py @@ -87,6 +87,7 @@ class ElectricalMeasurementClusterHandler(ClusterHandler): "measurement_type": True, "power_divisor": True, "power_multiplier": True, + "power_factor": True, } async def async_update(self): diff --git a/tests/components/zha/zha_devices_list.py b/tests/components/zha/zha_devices_list.py index 3be6322d1eb..842110ace87 100644 --- a/tests/components/zha/zha_devices_list.py +++ b/tests/components/zha/zha_devices_list.py @@ -2088,11 +2088,6 @@ DEVICES = [ DEV_SIG_ENT_MAP_CLASS: "ElectricalMeasurementRMSVoltage", DEV_SIG_ENT_MAP_ID: "sensor.lumi_lumi_plug_maus01_voltage", }, - ("sensor", "00:11:22:33:44:55:66:77-1-2820-power_factor"): { - DEV_SIG_CLUSTER_HANDLERS: ["electrical_measurement"], - DEV_SIG_ENT_MAP_CLASS: "ElectricalMeasurementPowerFactor", - DEV_SIG_ENT_MAP_ID: "sensor.lumi_lumi_plug_maus01_power_factor", - }, ("sensor", "00:11:22:33:44:55:66:77-1-0-rssi"): { DEV_SIG_CLUSTER_HANDLERS: ["basic"], DEV_SIG_ENT_MAP_CLASS: "RSSISensor",