From 9f9602e8a7cb5510ce7869af19f0bcbf3a5db31f Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Mon, 24 Jul 2023 21:07:57 +0000 Subject: [PATCH] Add frequency sensor for Shelly Plus/Pro xPM devices (#97172) --- homeassistant/components/shelly/sensor.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/homeassistant/components/shelly/sensor.py b/homeassistant/components/shelly/sensor.py index 8c98eb6473c..b52e176b521 100644 --- a/homeassistant/components/shelly/sensor.py +++ b/homeassistant/components/shelly/sensor.py @@ -661,6 +661,16 @@ RPC_SENSORS: Final = { state_class=SensorStateClass.TOTAL_INCREASING, entity_registry_enabled_default=False, ), + "freq": RpcSensorDescription( + key="switch", + sub_key="freq", + name="Frequency", + native_unit_of_measurement=UnitOfFrequency.HERTZ, + suggested_display_precision=0, + device_class=SensorDeviceClass.FREQUENCY, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), "freq_pm1": RpcSensorDescription( key="pm1", sub_key="freq",