-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Let input entities date and number be active when unknown #29306
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
base: dev
Are you sure you want to change the base?
Conversation
If a state is |
|
If entity is not known. The state will be UNAVAILABLE not UNKNOWN. |
This is backend we are talking about. Not sure why states() function would say unknown there. If its a non-existent entity, the stateObj object would not exist at all. Looks like the states() function either just hides this case or is buggy. |
|
Checked docs on that function and it is apparently documented to work that way. That is rather weird, but we are not using that here. A none/empty value from an integration will lead to the state unknown. Ie unset value or no update has been performed to read the value have been performed yet. This doesn't indicate we cant set a value. |
|
Yup we check for missing entities explicitly: https://github.com/home-assistant/frontend/pull/29306/changes#diff-ed6fd621be88cc092b3e7a8b5ccd3881e04145b03129aa26c403727f2fe6c1fbR66 |
|
Number, datetime inputs can all return None from their native value functions. That is translated to "unknown" state string: |
|
If the entity doesn't exist, it will not be in the state machine so stateObj will be undefined. I also personally think that we should not consider unknown as available. We should look where this unavailable helper is used in the codebase to see if we can remove the unknown check everywhere. |
|
Dont fully follow. But if its not in state machine its really unavailable. But the case of being in state machine, it can be STATE_UNKNOWN (integration returned none as state value). STATE_UNAVAILABLE (integration returned false in the available property). So we have three cases. I would prefer not to differentiate between not in state machine and unavailable. ( I hate the yellow notification on entities from unloaded entities. I disable integrations seasonally, but that is just me) |



Breaking change
Proposed change
Entities of input type like numbers, text or date fields should not be disabled due to the value currently being unknown. The user is in charge of setting a value even if the current value is in an unknown state.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: