-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Allow device actions to specify extra fields #4002
Allow device actions to specify extra fields #4002
Conversation
} | ||
|
||
public componentDidUpdate(prevProps) { | ||
if (prevProps.action !== this.props.action) { |
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.
We should use the deviceAutomationsEqual
function here (also on the others btw)
@@ -57,7 +66,7 @@ export const fetchDeviceTriggerCapabilities = ( | |||
trigger, | |||
}); | |||
|
|||
const whitelist = ["above", "below", "for"]; | |||
const whitelist = ["above", "below", "code", "for"]; |
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.
This might get a bit out of hand..
Maybe it would be better to pass the automation's extra_fields list to deviceAutomationsEqual instead?
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.
Yeah, agree
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.
The problem is just that HaDeviceAutomationPicker doesn't know about the extra fields right now.
Allow device actions to specify extra fields which will then be shown in the UI using ha-form.
This is same as #3970 but for actions.