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

Deprecate speed limit lock in Tessie #113848

Merged
merged 18 commits into from
Apr 24, 2024

Conversation

Bre77
Copy link
Contributor

@Bre77 Bre77 commented Mar 19, 2024

Proposed change

Disables speed limit lock by default and adds a warning message that it will be removed in 2024.11.0
As requested by @frenck

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

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

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 Ruff (ruff format 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 home-assistant bot added cla-signed deprecation Indicates a breaking change to happen in the future has-tests integration: tessie small-pr PRs with less than 30 lines. by-code-owner Quality Scale: No score labels Mar 19, 2024
Copy link
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

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

We have some methods that also check if an entity is used in an automation. I think we use it in lutron light platform and harmony switch platform

@home-assistant home-assistant bot marked this pull request as draft March 27, 2024 09:27
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@gjohansson-ST
Copy link
Member

It would be better to check this when setting up the entity.

  • If already in entity reg, make issue and set it up
  • If not in entity reg, don't make issue and don't create entity (so new setups don't get this entity at all)

@Bre77
Copy link
Contributor Author

Bre77 commented Mar 27, 2024

It would be better to check this when setting up the entity.

  • If already in entity reg, make issue and set it up
  • If not in entity reg, don't make issue and don't create entity (so new setups don't get this entity at all)

Thats going to cause an issue to be created for every integration user even if they have never touched the entity. I assume the repair action would be to disable it? Is there an example of where this has been done before because it seems a fair bit more complex to implement.

@Bre77
Copy link
Contributor Author

Bre77 commented Mar 27, 2024

Ok ive seen the way lutron does it and that seems reasonable. Hopefully it doesnt kill test coverage.

@Bre77
Copy link
Contributor Author

Bre77 commented Mar 27, 2024

lutron broke coverage in a way I have no idea how to fix, so doing the harmony way instead.

@Bre77 Bre77 marked this pull request as ready for review March 28, 2024 04:48
@home-assistant home-assistant bot requested a review from joostlek March 28, 2024 04:48
homeassistant/components/tessie/lock.py Show resolved Hide resolved
homeassistant/components/tessie/lock.py Show resolved Hide resolved
homeassistant/components/tessie/lock.py Outdated Show resolved Hide resolved
homeassistant/components/tessie/strings.json Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft March 28, 2024 09:06
@Bre77 Bre77 marked this pull request as ready for review March 28, 2024 09:14
@home-assistant home-assistant bot marked this pull request as draft March 30, 2024 14:15
@Bre77 Bre77 marked this pull request as ready for review March 31, 2024 02:08
tests/components/tessie/test_lock.py Outdated Show resolved Hide resolved
tests/components/tessie/test_lock.py Show resolved Hide resolved
homeassistant/components/tessie/lock.py Outdated Show resolved Hide resolved
homeassistant/components/tessie/lock.py Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft April 1, 2024 15:53
Bre77 and others added 4 commits April 2, 2024 07:44
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
@Bre77 Bre77 marked this pull request as ready for review April 1, 2024 21:54
@@ -72,18 +83,39 @@ async def test_locks(
assert hass.states.get(entity_id).state == STATE_UNLOCKED
mock_run.assert_called_once()


async def test_speed_limit_lock(
Copy link
Member

Choose a reason for hiding this comment

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

Could we just add to test that the issues are created correctly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Sorry for the delay.

homeassistant/components/tessie/strings.json Outdated Show resolved Hide resolved
homeassistant/components/tessie/strings.json Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft April 2, 2024 17:17
Bre77 and others added 2 commits April 7, 2024 09:55
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
@Bre77 Bre77 marked this pull request as ready for review April 15, 2024 01:42
@Bre77
Copy link
Contributor Author

Bre77 commented Apr 24, 2024

@gjohansson-ST I think this needs to make it into 2024.5, so can you please review the final changes you requested?

homeassistant/components/tessie/strings.json Outdated Show resolved Hide resolved
homeassistant/components/tessie/strings.json Outdated Show resolved Hide resolved
homeassistant/components/tessie/strings.json Outdated Show resolved Hide resolved
homeassistant/components/tessie/strings.json Outdated Show resolved Hide resolved
homeassistant/components/tessie/strings.json Outdated Show resolved Hide resolved
homeassistant/components/tessie/strings.json Outdated Show resolved Hide resolved
homeassistant/components/tessie/strings.json Outdated Show resolved Hide resolved
Copy link
Member

@gjohansson-ST gjohansson-ST left a comment

Choose a reason for hiding this comment

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

Approved once CI passes. I hope I did it correctly with the translations links.
Thanks @Bre77 👍

@gjohansson-ST gjohansson-ST merged commit 0e0b543 into home-assistant:dev Apr 24, 2024
24 checks passed
@Bre77 Bre77 deleted the tessie-removelock branch April 24, 2024 11:39
@github-actions github-actions bot locked and limited conversation to collaborators Apr 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
by-code-owner cla-signed deprecation Indicates a breaking change to happen in the future has-tests integration: tessie Quality Scale: No score small-pr PRs with less than 30 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants