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 <goran.johansson@shiftit.se>

* Fix tests

* Fix comment

* Break line

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Grant 2024-01-15 22:53:16 +10:00 committed by GitHub
parent ede6e01808
commit 5dde45e01f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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