Replace Guardian `disable_ap` and `enable_ap` services with a switch
Breaking change
The Guardian binary sensor that previously showed whether the onboard AP was enabled has been removed and replaced by a switch.
Proposed change
This PR follows up on https://github.com/home-assistant/core/pull/75028 and replaces two more Guardian services – guardian.disable_ap and guardian.enable_ap – with a switch.

Since the services are now deprecated, I'll plan on making a breaking change after two versions from when this is merged. As-is, this PR is also a breaking change since it removes the previous binary sensor representing onboard AP status. I could have put everything into one breaking change, but I wanted to be consistent with https://github.com/home-assistant/core/pull/75028.
Users will be notified of both the service deprecation and the removed binary sensor by log entries and repairs issues.
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)
- [x] 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: N/A
- This PR is related to issue: N/A
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/23374
Checklist
- [x] The code change is tested and works locally.
- [x] Local tests pass. Your PR cannot be merged unless tests pass
- [x] There is no commented out code in this PR.
- [x] I have followed the development checklist
- [x] 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:
- [x] Documentation added/updated for www.home-assistant.io
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 runningpython3 -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.
The integration reached or maintains the following Integration Quality Scale:
- [ ] No score or internal
- [ ] 🥈 Silver
- [ ] 🥇 Gold
- [ ] 🏆 Platinum
To help with the load of incoming pull requests:
- [ ] I have reviewed two other open pull requests in this repository.
Users will be warned about the service deprecation in the logs – for example:
So this is not a breaking change, but a deprecation? (Please note, we have a different checkbox & label for that now and no longer marking it as breaking change during the deprecation phase).
@frenck From the issue description:
Since the services are now deprecated, I'll plan on making a breaking change after two versions from when this is merged. As-is, this PR is also a breaking change since it removes the previous binary sensor representing onboard AP status. I could have put everything into one breaking change, but I wanted to be consistent with https://github.com/home-assistant/core/pull/75028.
The switch migration is a deprecation; the removal of the binary sensor is a breaking change. Happy to keep the binary sensor for now if you think a single breaking change later on (after the deprecation period) is better?
Aah sorry, yeah that is fine 👍
Marking as draft until https://github.com/home-assistant/core/pull/76336 is merged.
Marking as draft while I address feedback on https://github.com/home-assistant/core/pull/76484 (lots of overlap).
Can you leave the sensor around to only have a single deprecation point?
Thanks for the nudge, @elupus! The latest leaves the binary sensor in place and adjusts the Repairs item to indicate that it will be removed in the future.
Thanks, @elupus!