hass-core/tests/components/homeassistant
Tudor Sandu 837f34c40c
Add scene.delete service for dynamically created scenes (with scene.create) ()
* Added scene.delete service

Only for scenes created with scene.create

* Refactor after  

* 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
..
snapshots Use ReadOnlyDict for entity registry options () 2023-05-30 20:11:39 -04:00
triggers Update h* tests to use entity & device registry fixtures () 2023-11-12 13:52:32 -05:00
__init__.py
test_exposed_entities.py Allow setting google disable 2fa flag on any entity () 2023-05-03 09:55:38 -04:00
test_init.py Make it possible to restart core in safe mode () 2023-10-24 14:47:58 +02:00
test_scene.py Add scene.delete service for dynamically created scenes (with scene.create) () 2023-11-25 20:14:48 +01:00