Skip to content

Allow binary sensor device class updates#12124

Merged
zsarnett merged 6 commits intodevfrom
allow-bindary-sensor-device-class-change
Mar 28, 2022
Merged

Allow binary sensor device class updates#12124
zsarnett merged 6 commits intodevfrom
allow-bindary-sensor-device-class-change

Conversation

@zsarnett
Copy link
Copy Markdown
Contributor

Breaking change

Proposed change

Allows choosing between all device classes in the binary sensor settings

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:

],
],
binary_sensor: [
["connectivity", "lock", "update"], // Other
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.

connectivity and update

I don't see how this ever can be miscategorized and the user needs to edit it… do we really need to cover ALL binary sensor device classes ?

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.

Update I can see

But I could see Connectivity being needed?

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.

I guess if you want to change connectivity to be problem?

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.

I took it out. I guess lets see if it comes up

return;
}

this._error = undefined;
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.

All these things will cause a new re-render. That means the changes need to be made in willUpdate.

balloob
balloob previously approved these changes Mar 28, 2022
@zsarnett zsarnett merged commit 61f6e88 into dev Mar 28, 2022
@zsarnett zsarnett deleted the allow-bindary-sensor-device-class-change branch March 28, 2022 15:44
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 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