Skip to content

Commit a57bcbf

Browse files
committed
Handle possible missing dictionary item
* custom_components/daikin_onecta/select.py:
1 parent c47205e commit a57bcbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/daikin_onecta/select.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async def async_select_option(self, option: str) -> None:
100100
if self._embedded_id == management_point["embeddedId"]:
101101
management_point_type = management_point["managementPointType"]
102102
if self._management_point_type == management_point_type:
103-
scheduledict = management_point[self._value]
103+
scheduledict = management_point.get(self._value)
104104
if scheduledict is not None:
105105
currentMode = scheduledict["value"]["currentMode"]["value"]
106106
# Look for a schedule with the user selected readable name, when we find it, we use the schedule id

0 commit comments

Comments
 (0)