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

Remove Picnic Cart items count sensor #104349

Closed

Conversation

DCSBL
Copy link
Contributor

@DCSBL DCSBL commented Nov 22, 2023

Breaking change

Picnic 'Cart items count' sensor has been removed, as the same value now is exposed by the Picnic Shopping cart To-do sensor.

Proposed change

Sensor is duplicate and has no use anymore.

Type of change

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

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

Hey there @corneyl, mind taking a look at this pull request as it has been labeled with an integration (picnic) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of picnic can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign picnic Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@hmmbob
Copy link
Contributor

hmmbob commented Nov 22, 2023

Please don't. I'm not using the to-do integration, and this count sensor is thus the only sensor presenting this information to me.

@DCSBL
Copy link
Contributor Author

DCSBL commented Nov 22, 2023

The to-do platform is added automatically, even when you do not use it. You can just use the todo.picnic_shopping_cart sensor and get the exact same value as sensor.picnic_cart_items_count sensor.

image image

@hmmbob
Copy link
Contributor

hmmbob commented Nov 22, 2023

It's not if one isn't using default_config: for any reason, which is supported configuration by Home Assistant.

What's the issue you're trying to resolve with the introduction of this breaking change?

@DCSBL
Copy link
Contributor Author

DCSBL commented Nov 22, 2023

It's not if one isn't using default_config: for any reason,

Can you see if you are correct by testing this assumption? default_config: does not even load To-do, so I suspect your situation does not occur and at least the sensor does just show up. Feel free to proof me wrong 🙂.

What's the issue you're trying to resolve with the introduction of this breaking change?

The duplicate sensor.

@hmmbob
Copy link
Contributor

hmmbob commented Nov 22, 2023

It's not if one isn't using default_config: for any reason,

Can you see if you are correct by testing this assumption? default_config: does not even load To-do, so I suspect your situation does not occur and at least the sensor does just show up. Feel free to proof me wrong 🙂.

image
image

So not linked to default_config directly, still wondering how it would get loaded then automatically in your situation. In any case, I haven't used it nor added it manually.

@DCSBL
Copy link
Contributor Author

DCSBL commented Nov 22, 2023

Todo is not added in Picnic in the current release, please try adding a local todo list.

@hmmbob
Copy link
Contributor

hmmbob commented Nov 22, 2023

Todo is not added in Picnic in the current release, please try adding a local todo list.

Which is proving my initial comment: you should not remove this sensor from Picnic as the other one does not need to be set up at all.

edit: or are you saying it will be there in 2023.12?

@corneyl
Copy link
Contributor

corneyl commented Nov 22, 2023

The Picnic 'Todo list' cart will be added in the next release, see #102855. There's no additional setup needed, it's just part of the Picnic integration. Maybe that clarifies things a bit 😄

@joostlek
Copy link
Member

We should give users 6 months to update their automations. So I would suggest adding a comment that this sensor should be removed in 2024.6.

Side question, when you have 2 of the same items in your cart, What does the todo list entity show as state and what does the sensor show as state?

@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Nov 23, 2023
@frenck
Copy link
Member

frenck commented Nov 25, 2023

Honestly, I would not remove this sensor (maybe disabled by default).

@joostlek
Copy link
Member

With what reasoning? Not that I'm against it, but I want to know the rationale behind it

@DCSBL
Copy link
Contributor Author

DCSBL commented Nov 25, 2023

The reason is that we have added a sensor (shopping cart) that does exactly the same as the removed one, as far as I thought. So except from users (or Home Assistant) having to migrate things, I expect no change.

So it is just a clean-up.

But there didn’t expect so many discussion, I will take a second look to make sure there are no changes for the user.

@DCSBL DCSBL closed this Nov 25, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 26, 2023
@DCSBL DCSBL deleted the picnic-remove-duplicate-sensor branch December 11, 2024 08:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change cla-signed has-tests integration: picnic Quality Scale: No score small-pr PRs with less than 30 lines. smash Indicator this PR is close to finish for merging or closing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants