core/tests/components/fan
Jan Bouwhuis 953a212dd6
Use ServiceValidationError for invalid fan preset_mode and move check to fan entity component (#104560)
* 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
..
__init__.py
common.py
test_device_action.py Fix fan device actions (#102797) 2023-10-25 23:22:38 -04:00
test_device_condition.py Use real devices in fan device condition tests (#102708) 2023-10-24 23:32:56 +02:00
test_device_trigger.py Use real devices in fan device trigger tests (#102686) 2023-10-24 21:57:57 +02:00
test_init.py Use ServiceValidationError for invalid fan preset_mode and move check to fan entity component (#104560) 2023-11-29 13:56:51 +01:00
test_recorder.py Always setup demo platforms with device support from config entry (#94586) 2023-06-14 16:50:35 +02:00
test_reproduce_state.py Add type hints to integration tests (part 6) (#87979) 2023-02-13 09:45:11 +01:00