Skip to content

State Trigger -> HA Form#11631

Merged
zsarnett merged 9 commits intodevfrom
State-Trigger->-ha-form
Feb 10, 2022
Merged

State Trigger -> HA Form#11631
zsarnett merged 9 commits intodevfrom
State-Trigger->-ha-form

Conversation

@zsarnett
Copy link
Copy Markdown
Contributor

@zsarnett zsarnett commented Feb 9, 2022

Breaking change

Proposed change

Converts the State Trigger form to ha-form
Adds Duration Selector

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

zsarnett and others added 6 commits February 10, 2022 08:25
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>

@property({ type: Boolean }) public disabled = false;

@property() public schema?: HaFormSchema;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should not pass the ha-form schema to the selector, just the elements we need.
So we should just set required here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

And this changes the functionality now for other uses, they would be required by default, but now they are optional by default?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Gotcha. Schema was already being passed so I just picked it up

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, but a selector should be usable without ha-form

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yup Agreed

@zsarnett zsarnett deleted the State-Trigger->-ha-form branch February 10, 2022 15:26
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 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.

3 participants