mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Clean up validate_supported_features in selector helper (#148843)
This commit is contained in:
parent
36156d9c54
commit
e89ae021d8
@ -117,11 +117,8 @@ def _validate_supported_feature(supported_feature: str) -> int:
|
|||||||
raise vol.Invalid(f"Unknown supported feature '{supported_feature}'") from exc
|
raise vol.Invalid(f"Unknown supported feature '{supported_feature}'") from exc
|
||||||
|
|
||||||
|
|
||||||
def _validate_supported_features(supported_features: int | list[str]) -> int:
|
def _validate_supported_features(supported_features: list[str]) -> int:
|
||||||
"""Validate a supported feature and resolve an enum string to its value."""
|
"""Validate supported features and resolve enum strings to their value."""
|
||||||
|
|
||||||
if isinstance(supported_features, int):
|
|
||||||
return supported_features
|
|
||||||
|
|
||||||
feature_mask = 0
|
feature_mask = 0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user