-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add numeric state condition for conditional card #18288
Conversation
return false; | ||
} | ||
|
||
const numericState = Number(entity.state); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check if the state is actually a number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right! Because it can be unavailable even if it's not a number.
I will be NaN
and the below or above condition will fail but I agree we should have a guard here.
4cddd2c
to
b046507
Compare
b046507
to
ddc9a73
Compare
Proposed change
Add numeric state condition for conditional card
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: