Skip to content

Add scene.delete service for dynamically created scenes (with scene.create)#89090

Merged
MartinHjelmare merged 9 commits into
home-assistant:devfrom
tetele:scene-delete
Nov 25, 2023
Merged

Add scene.delete service for dynamically created scenes (with scene.create)#89090
MartinHjelmare merged 9 commits into
home-assistant:devfrom
tetele:scene-delete

Conversation

@tetele
Copy link
Copy Markdown
Contributor

@tetele tetele commented Mar 3, 2023

Breaking change

Proposed change

Add a new scene.delete service that deletes temporary scenes created with the scene.create service.

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

Although there is no open issue for this PR, here are a few links to it being requested:

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
  • 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
Copy Markdown
Contributor

home-assistant Bot commented Mar 3, 2023

Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration (scene) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of scene 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 scene Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@home-assistant
Copy link
Copy Markdown
Contributor

home-assistant Bot commented Mar 3, 2023

Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration (homeassistant) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of homeassistant 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 homeassistant Removes the current integration label and assignees on the pull request, add the integration domain after the command.

tetele added a commit to tetele/home-assistant.io that referenced this pull request Mar 3, 2023
@MartinHjelmare MartinHjelmare changed the title Added scene.delete service for dynamically created scenes (with scene.create) Add scene.delete service for dynamically created scenes (with scene.create) Mar 3, 2023
@tetele tetele marked this pull request as ready for review March 7, 2023 09:01
@tetele tetele requested a review from a team as a code owner March 7, 2023 09:01
@tetele tetele force-pushed the scene-delete branch 2 times, most recently from 31f301b to 979f0b1 Compare March 8, 2023 15:17
tetele pushed a commit to tetele/home-assistant.io that referenced this pull request Mar 8, 2023
2023.3: Beta release notes

2023.3: Update KNX change description (home-assistant#26347)

2023.3: Process community feedback on beta release notes

2023.3: Add Z-Wave JS breaking change details

Clarify the example is below the sentence (home-assistant#26349)

Update Insteon documentation (home-assistant#26399)

2023.3: Finalize restarting Home Assistant

2023.3: Finalize Python 3.11 section

2023.3: Finalize sensor precision

2023.3: Finalize new integrations

2023.3: Finalize breaking change + dev blog links

2023.3: Finalize other noteworthy changes

2023.3: Add missing todoist breaking change

2023.3: Finalize new automation dialog

2023.3: Finalize thread and matter

2023.3: Finalize intro

2023.3: Finalize new light dialog

2023.3: Title, date, description, links

2023.3: Small tweaks

2023.3: Small tweaks

Add Heltun integration (home-assistant#26411)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

Revert "Update derivative.markdown" (home-assistant#26402)

Remove reference to non-implemented attributes (home-assistant#26408)

Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

2023.3: Update changelog

Fix cover templates breaking change text

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Use brand logos if ha_brand in search results (home-assistant#26427)

Clarify Thread border router credential sync (home-assistant#26423)

2023.3.1 (home-assistant#26430)

* 2023.3.1

* Update source/_posts/2023-03-01-release-20233.markdown

* Update source/_posts/2023-03-01-release-20233.markdown

add reinstall instructions (home-assistant#26439)

Bump rack from 2.2.6.2 to 2.2.6.3 (home-assistant#26440)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Add scene.delete service

See home-assistant/core#89090

Add climate devices documentation for LIVISI integration (home-assistant#25957)

Add Camera to Prosegur (home-assistant#25419)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

Adding Obihai codeowner (home-assistant#26386)

HELTUN partnership announcement blog post (home-assistant#26415)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

Update renault documentation - Add button section (home-assistant#26260)

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

Document energy_storage and volume_storage device classes (home-assistant#26394)

Co-authored-by: Franck Nijhof <git@frenck.dev>

Add Config Flow to Obihai (home-assistant#26354)

Add reolink button entities (home-assistant#26355)

device_class and state_class (home-assistant#25742)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

Reolink add switch entities (home-assistant#26353)

Co-authored-by: Franck Nijhof <git@frenck.dev>

Add Reolink siren documentation (home-assistant#26282)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>

Add Reolink select entities (home-assistant#26341)

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>

Add new Reolink number entities (home-assistant#26283)

Add reolink light entities (home-assistant#26338)

Add Obihai Reboot button (home-assistant#26385)

Add clarification for reolink entities (home-assistant#26469)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

Add Door cover documentation (home-assistant#26331)

Resolves home-assistant/core#80741
@github-actions
Copy link
Copy Markdown

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions Bot added the stale label Jul 10, 2023
@tetele
Copy link
Copy Markdown
Contributor Author

tetele commented Jul 10, 2023

Not stale. Will merge base branch when I'll be back from my holiday :D

@sidevesh
Copy link
Copy Markdown

@tetele what is left for this to be merged ? Is this ready for review ? This has been stuck for quite some time.

@tetele
Copy link
Copy Markdown
Contributor Author

tetele commented Sep 24, 2023

I see some failing tests after a rebase. I will look into it the next few days, but nobody has picked this up for review yet.

@tetele
Copy link
Copy Markdown
Contributor Author

tetele commented Sep 25, 2023

There, @sidevesh, all tests are green. Now maybe someone can review the PR. Feel free to do so yourself, if you want to.

@sidevesh
Copy link
Copy Markdown

thanks @tetele, I don't have write access so I can't review, @MartinHjelmare can you review maybe ?

@MartinHjelmare
Copy link
Copy Markdown
Member

Please don't ping for review.

Comment thread homeassistant/components/homeassistant/scene.py
Comment thread homeassistant/components/scene/services.yaml
Comment thread homeassistant/components/scene/strings.json
Comment thread homeassistant/components/homeassistant/scene.py Outdated
@home-assistant home-assistant Bot marked this pull request as draft November 23, 2023 15:18
@home-assistant
Copy link
Copy Markdown
Contributor

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.

@tetele tetele changed the title Add scene.delete service for dynamically created scenes (with scene.create) Add homeassistant.delete_scene service for dynamically created scenes (with scene.create) Nov 23, 2023
@tetele tetele marked this pull request as ready for review November 23, 2023 23:23
Comment thread homeassistant/components/homeassistant/scene.py Outdated
Comment thread tests/components/homeassistant/test_scene.py Outdated
Comment thread homeassistant/components/homeassistant/scene.py Outdated
Comment thread homeassistant/components/homeassistant/services.yaml Outdated
Comment thread homeassistant/components/homeassistant/strings.json Outdated
@home-assistant home-assistant Bot marked this pull request as draft November 24, 2023 08:14
@tetele tetele changed the title Add homeassistant.delete_scene service for dynamically created scenes (with scene.create) Add scene.delete service for dynamically created scenes (with scene.create) Nov 24, 2023
Comment thread homeassistant/components/homeassistant/scene.py Outdated
Comment thread homeassistant/components/scene/services.yaml Outdated
Comment thread homeassistant/components/scene/strings.json Outdated
Comment thread tests/components/homeassistant/test_scene.py
@tetele tetele force-pushed the scene-delete branch 2 times, most recently from f74da3c to 39c5624 Compare November 24, 2023 18:16
tetele and others added 9 commits November 25, 2023 05:18
Only for scenes created with scene.create
First, check if entity_id is a scene
Second, check if it's a scene created with `scene.create`
- Move service to `homeassistant` domain
- Register with `platform.async_register_entity_service`
- Raise validation errors instead of just logging messages
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
@MartinHjelmare
Copy link
Copy Markdown
Member

Are we ready to merge? Please click ready for review when ready.

@tetele tetele marked this pull request as ready for review November 25, 2023 19:09
@tetele
Copy link
Copy Markdown
Contributor Author

tetele commented Nov 25, 2023

I was waiting to see that all checks were passing. Ready for review, cap'n, sir! :D

Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Thanks!

@MartinHjelmare MartinHjelmare merged commit 837f34c into home-assistant:dev Nov 25, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants