From 5dde45e01f51e7974afd0e92db83464e356d48e1 Mon Sep 17 00:00:00 2001 From: Grant <38738958+ThePapaG@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:53:16 +1000 Subject: [PATCH] Fix comment for SmartThings fan capability (#108086) * Fix the fan to support preset modes * Add more tests and fix some comments * Don't override inherited member * Don't check for supported feature as the check is already performed before here * Do not check for feature on properties * Update homeassistant/components/smartthings/fan.py Co-authored-by: G Johansson * Fix tests * Fix comment * Break line --------- Co-authored-by: G Johansson Co-authored-by: Martin Hjelmare --- homeassistant/components/smartthings/fan.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/smartthings/fan.py b/homeassistant/components/smartthings/fan.py index 647a99ebfa6..0e15ea7800a 100644 --- a/homeassistant/components/smartthings/fan.py +++ b/homeassistant/components/smartthings/fan.py @@ -52,7 +52,9 @@ def get_capabilities(capabilities: Sequence[str]) -> Sequence[str] | None: Capability.fan_speed, ] - # If none of the optional capabilities are supported then error + # At least one of the optional capabilities must be supported + # to classify this entity as a fan. + # If they are not then return None and don't setup the platform. if not any(capability in capabilities for capability in optional): return None