core icon indicating copy to clipboard operation
core copied to clipboard

Add config flow to Manual Alarm control panel

Open gjohansson-ST opened this issue 1 year ago • 1 comments

Proposed change

Add config flow to manual As it's a helper the yaml configuration remains as before

Type of change

  • [ ] Dependency upgrade
  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [ ] New integration (thank you!)
  • [x] 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: https://github.com/home-assistant/home-assistant.io/pull/34392

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] I have followed the perfect PR recommendations
  • [x] The code has been formatted using Ruff (ruff format homeassistant tests)
  • [x] 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:

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

To help with the load of incoming pull requests:

gjohansson-ST avatar Aug 21 '24 20:08 gjohansson-ST

I don't think we should make this integration easier to set up. It's a maintenance risk. I'd rather we focus efforts on the template alarm control panel.

MartinHjelmare avatar Aug 24 '24 11:08 MartinHjelmare

I don't think we should make this integration easier to set up. It's a maintenance risk. I'd rather we focus efforts on the template alarm control panel.

That makes sense but this integration is made to construct an alarm control panel while template is for templating an existing one so they serve very different purposes (today). I'm not sure it would be advisable either to modify template in such way it can also build an alarm (like manual does)?

gjohansson-ST avatar Sep 12 '24 08:09 gjohansson-ST

You can use the alarm control panel template platform to make a new alarm too. I'm doing that. I just added an input select entity to hold state and some scripts to update that state. With template blueprints it would be simple to set up an equivalent to the manual alarm using the template platform.

MartinHjelmare avatar Sep 12 '24 08:09 MartinHjelmare

The needed improvements to the alarm control panel template platform would just be a config flow and to inherit from RestoreEntity which is currently missing.

MartinHjelmare avatar Sep 12 '24 08:09 MartinHjelmare

We discussed this in the Core team and concluded we don't want to add a config flow to this integration, per above reasoning.

MartinHjelmare avatar Sep 13 '24 03:09 MartinHjelmare