1
mirror of https://github.com/home-assistant/core synced 2024-07-15 09:42:11 +02:00
ha-core/homeassistant/components/scene
Tudor Sandu 837f34c40c
Add scene.delete service for dynamically created scenes (with scene.create) (#89090)
* Added scene.delete service

Only for scenes created with scene.create

* Refactor after #95984 #96390

* Split scene validation in 2

First, check if entity_id is a scene
Second, check if it's a scene created with `scene.create`

* Address feedback

- Move service to `homeassistant` domain
- Register with `platform.async_register_entity_service`
- Raise validation errors instead of just logging messages

* Revert moving the service to the `homeassistant` domain

* Remove unneeded validation

* Use helpers and fix tests

* Apply suggestions from code review

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

* Fix linting

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-11-25 20:14:48 +01:00
..
__init__.py
manifest.json
services.yaml Add scene.delete service for dynamically created scenes (with scene.create) (#89090) 2023-11-25 20:14:48 +01:00
strings.json Add scene.delete service for dynamically created scenes (with scene.create) (#89090) 2023-11-25 20:14:48 +01:00