From 94798b5d9bf9c4effd43de0c6b3bff7563351ba3 Mon Sep 17 00:00:00 2001 From: Marc Billow Date: Sun, 9 Aug 2026 00:08:27 +0000 Subject: [PATCH] Fix ty type-check failure in select.py _display_option read self._bound.desc.display_fn without narrowing desc's type first, unlike every other method in this class -- desc is typed as the base SamsungEntityDescription, which has no display_fn (only SelectDesc does). Cast it, matching the rest of the class. --- custom_components/localthings/select.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/localthings/select.py b/custom_components/localthings/select.py index 7a82a5a..2ca918a 100644 --- a/custom_components/localthings/select.py +++ b/custom_components/localthings/select.py @@ -97,7 +97,7 @@ class LocalThingsSelect(LocalThingsEntity, SelectEntity): def _display_option(self, value): """Normalize both current state and options through one path.""" - display_fn = self._bound.desc.display_fn + display_fn = cast(SelectDesc, self._bound.desc).display_fn fallback_fn = ( (lambda raw: display_fn(raw, self._resources)) if display_fn is not None else None )