-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Script field defaults are not used in frontend #20182
Comments
I encountered the same issue about that the default values are not populated for script fields. Especially for numbers with sliders, it appears that the field is populated with value 0, but the field would be undefined when running. The error message:
The script is here. |
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist
Describe the issue you are experiencing
When Field descriptions with selectors are used for service or blueprints, the default: value is typically pre-filled in the field when the field is selected (in case its optional).
However, the script fields in the More Info dialog does not seem to get populated with with the default value in case defaults are defined.
Describe the behavior you expected
I think that is a usefull feature to allow defining defaults for the script input fields and reduce the fields that must be filled in by user.
This should work the same way as for blueprint and service forms
Steps to reproduce the issue
1 script with field definition. UI also supports setting the default value:
fields:
service:
required: true
name: Service
default: anker_solix.update_solarbank_schedule
selector:
select:
mode: dropdown
options:
- label: Set schedule
value: anker_solix.set_solarbank_schedule
- label: Update schedule
value: anker_solix.update_solarbank_schedule
What version of Home Assistant Core has the issue?
2024.3.3
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
Firefox 124.0.1 (64-bit)
Which operating system are you using to run this browser?
Windows 11
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: