diff --git a/appdaemon/plugins/hass/hassapi.py b/appdaemon/plugins/hass/hassapi.py index 74bc1d142..ca66ce2e1 100644 --- a/appdaemon/plugins/hass/hassapi.py +++ b/appdaemon/plugins/hass/hassapi.py @@ -410,10 +410,10 @@ def constrain_input_boolean(self, value: str | Iterable[str]) -> bool: def constrain_input_select(self, value: str | Iterable[str]) -> bool: """Returns True if unconstrained - all inputs match a desired state.""" match value: - case Iterable(): - constraints = value if isinstance(value, list) else list(value) case str(): constraints = [value] + case Iterable(): + constraints = value if isinstance(value, list) else list(value) assert isinstance(constraints, list) and all(isinstance(v, str) for v in constraints)