Closed cdce8p closed 2 months ago
NullableNumber is defined as int | float | None. This prevents the use of other values for min / max in Range, Clamp and Length which also support rich comparisons. E.g. timedelta.
NullableNumber
int | float | None
min / max
Range
Clamp
Length
timedelta
Use SupportsAllComparisons from _typeshed instead.
SupportsAllComparisons
_typeshed
Refs https://github.com/home-assistant/core/pull/120268 /CC @bdraco
NullableNumber
is defined asint | float | None
. This prevents the use of other values formin / max
inRange
,Clamp
andLength
which also support rich comparisons. E.g.timedelta
.Use
SupportsAllComparisons
from_typeshed
instead.Refs https://github.com/home-assistant/core/pull/120268 /CC @bdraco