From 713b7cf36d758d361ba8016a92bca2dbe5e8da2b Mon Sep 17 00:00:00 2001 From: James <38914183+barneyonline@users.noreply.github.com> Date: Tue, 3 Mar 2026 06:48:39 +1100 Subject: [PATCH] Check Daikin zone temp keys before represent (#164297) Co-authored-by: barneyonline --- homeassistant/components/daikin/climate.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/daikin/climate.py b/homeassistant/components/daikin/climate.py index 03b00418fb5..d9917c3cfe6 100644 --- a/homeassistant/components/daikin/climate.py +++ b/homeassistant/components/daikin/climate.py @@ -112,11 +112,12 @@ def _zone_is_configured(zone: DaikinZone) -> bool: def _zone_temperature_lists(device: Appliance) -> tuple[list[str], list[str]]: """Return the decoded zone temperature lists.""" - try: - heating = device.represent(DAIKIN_ZONE_TEMP_HEAT)[1] - cooling = device.represent(DAIKIN_ZONE_TEMP_COOL)[1] - except AttributeError, KeyError: + values = device.values + if DAIKIN_ZONE_TEMP_HEAT not in values or DAIKIN_ZONE_TEMP_COOL not in values: return ([], []) + + heating = device.represent(DAIKIN_ZONE_TEMP_HEAT)[1] + cooling = device.represent(DAIKIN_ZONE_TEMP_COOL)[1] return (list(heating or []), list(cooling or []))