hass-core/tests/components/template
Jan Bouwhuis 953a212dd6
Use ServiceValidationError for invalid fan preset_mode and move check to fan entity component ()
* Use ServiceValidationError for fan preset_mode

* Use _valid_preset_mode_or_raise to raise

* Move preset_mode validation to entity component

* Fix bond fan and comments

* Fixes baf, fjaraskupan and template

* More integration adjustments

* Add custom components mock and test code

* Make NotValidPresetModeError subclass

* Update homeassistant/components/fan/strings.json

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

* Keep bond has_action validation

* Move demo test asserts outside context block

* Follow up comment

* Update homeassistant/components/fan/strings.json

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Fix demo tests

* Remove pylint disable

* Remove unreachable code

* Update homeassistant/components/fan/__init__.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Use NotValidPresetModeError, Final methods

* Address comments

* Correct docst

* Follow up comments

* Update homeassistant/components/fan/__init__.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-11-29 13:56:51 +01:00
..
fixtures
snapshots Deprecate weather.get_forecast () 2023-11-19 20:44:02 +01:00
__init__.py
conftest.py Enable Ruff PT022 () 2023-01-27 13:57:06 +01:00
test_alarm_control_panel.py Improve errors for component configuration with missing keys () 2023-11-15 10:47:05 +01:00
test_binary_sensor.py Add explicit test of template config entry setup () 2023-08-30 19:56:34 +02:00
test_button.py Python 3.10 support cleanups () 2023-08-21 19:14:07 +02:00
test_config_flow.py Assign specific error code for HomeAssistantError on websocket_api connection exceptions () 2023-11-29 13:07:52 +01:00
test_cover.py Improve formatting of component errors () 2023-11-17 23:01:00 +01:00
test_fan.py Use ServiceValidationError for invalid fan preset_mode and move check to fan entity component () 2023-11-29 13:56:51 +01:00
test_image.py Ruff: isort don't split imports based on trailing comma () 2023-08-10 14:27:03 +02:00
test_init.py Add type hints to integration tests (part 22) () 2023-02-16 14:08:03 +01:00
test_light.py Add RGB, RGBW and RGBWW capability to template.light () 2023-11-22 08:15:26 +01:00
test_lock.py Add type hints to integration tests (part 22) () 2023-02-16 14:08:03 +01:00
test_manual_trigger_entity.py Move TemplateEntity to template () 2023-08-24 15:37:04 +02:00
test_number.py Add type hints to integration tests (part 22) () 2023-02-16 14:08:03 +01:00
test_select.py Add type hints to integration tests (part 22) () 2023-02-16 14:08:03 +01:00
test_sensor.py Fix TriggerEntity.async_added_to_hass () 2023-09-11 14:33:43 +02:00
test_switch.py Add type hints to integration tests (part 22) () 2023-02-16 14:08:03 +01:00
test_template_entity.py Add type hints to integration tests (t-z) () 2023-02-08 19:10:53 +01:00
test_trigger.py Set automations which fail validation unavailable () 2023-06-27 18:23:33 +02:00
test_vacuum.py Check supported features in calls to vacuum services () 2023-07-10 13:05:47 +02:00
test_weather.py Deprecate weather.get_forecast () 2023-11-19 20:44:02 +01:00