Skip to content
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

Merged

Conversation

emontnemery
Copy link
Collaborator

@emontnemery emontnemery commented Oct 14, 2019

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.

}

public componentDidUpdate(prevProps) {
if (prevProps.action !== this.props.action) {
Copy link
Member

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"];
Copy link
Collaborator Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, agree

Copy link
Collaborator Author

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.

@bramkragten bramkragten merged commit 555b746 into home-assistant:dev Oct 14, 2019
@bramkragten bramkragten mentioned this pull request Oct 23, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants