From ca89d22a34884b789a4154a3e426f93243041042 Mon Sep 17 00:00:00 2001 From: Thomas Ytterdal Date: Sat, 1 Jun 2024 11:27:03 +0200 Subject: [PATCH] Ignore myuplink sensors without a description that provide non-numeric values (#115525) Ignore sensors without a description that provide non-numeric values Co-authored-by: Jan-Philipp Benecke --- homeassistant/components/myuplink/sensor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/myuplink/sensor.py b/homeassistant/components/myuplink/sensor.py index 6cde6b6b071..45a4590a843 100644 --- a/homeassistant/components/myuplink/sensor.py +++ b/homeassistant/components/myuplink/sensor.py @@ -160,6 +160,11 @@ async def async_setup_entry( if find_matching_platform(device_point) == Platform.SENSOR: description = get_description(device_point) entity_class = MyUplinkDevicePointSensor + # Ignore sensors without a description that provide non-numeric values + if description is None and not isinstance( + device_point.value, (int, float) + ): + continue if ( description is not None and description.device_class == SensorDeviceClass.ENUM