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

fix!: Home Assistant: remove duplicate sensor/select for select/number/button entities #25026

Merged
merged 6 commits into from
Dec 7, 2024

Conversation

Drafteed
Copy link
Contributor

@Drafteed Drafteed commented Dec 3, 2024

Breaking changes

This removes duplicate sensor for select and number entities in Home Assistant.
Additionally, it removes duplicate select for button entities.
It also removes removes duplicate sensor for text entities.

Based on #24198 (comment)

@Koenkk
Copy link
Owner

Koenkk commented Dec 3, 2024

I initially agreed to this and even made the change in one of the PRs, but since this has never been deprecated properly (no option to disable it) I think we should not put this in 2.0.0

@mundschenk-at
Copy link
Contributor

mundschenk-at commented Dec 4, 2024

How would you even deprecate it? Add another legacy setting that defaults to on for some versions? To follow semantic versioning, you'd have to remove it only in a 3.0.0 version that's probably very far beyond the horizon.

Personally, I think the switch from 1.x to 2.x allows "binary breaks" even without a formal deprecation period (and wasn't this also mentioned in the big PR/discussion for several weeks at least? Edit: Apparently I misremembered).

@Drafteed
Copy link
Contributor Author

Drafteed commented Dec 4, 2024

I initially agreed to this and even made the change in one of the PRs, but since this has never been deprecated properly (no option to disable it) I think we should not put this in 2.0.0

These sensors have long been disabled by default in HA. I believe it's nearly safe to remove them given the current scope of breaking changes. I think this should be in 2.0.0.

@Koenkk
Copy link
Owner

Koenkk commented Dec 4, 2024

These sensors have long been disabled by default in HA. I believe it's nearly safe to remove

That's very true indeed, then let's merge this into 2.0.0

Before merging:

@Drafteed Drafteed force-pushed the remove-ha-enum-sensors branch from fb4f4f5 to ffc6b3e Compare December 6, 2024 00:48
@Drafteed
Copy link
Contributor Author

Drafteed commented Dec 6, 2024

  • Can we easily generate a list of devices/sensors that are affected by this such that it can be added to Zigbee2MQTT 2.0.0 breaking changes #24198 ? This test case calls the discover method for all supported devices, I think by adding some console.log it should be possible to create a list?

Sure 😄 You can try to parse them as you like, I did it as JSON:

Removed sensor entities in favour of select entities
Removed select entities in favour of button entities
Removed sensor entities in favour of text entities

I think we can just make a note that duplicate entities have been removed from the HA.

@Koenkk Koenkk changed the title Remove duplicate sensor for select and number entities in HA fix!: Remove duplicate sensor for select and number entities in HA Dec 7, 2024
@Koenkk Koenkk changed the title fix!: Remove duplicate sensor for select and number entities in HA fix!: Home Assistant: remove duplicate sensor/select for select/number/button entities Dec 7, 2024
@Koenkk
Copy link
Owner

Koenkk commented Dec 7, 2024

Thanks! Added the following to #24198

  • Removed duplicate sensor/select for select/number/button entities, the full list of removed entities per model can be found here.

@Koenkk Koenkk merged commit ba45445 into Koenkk:dev Dec 7, 2024
11 checks passed
@Drafteed Drafteed deleted the remove-ha-enum-sensors branch December 8, 2024 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants