core/tests/components/bond
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 Switch formatting from black to ruff-format (#102893) 2023-11-27 14:38:59 +01:00
conftest.py
test_button.py Update bond tests to use entity & device registry fixtures (#103708) 2023-11-09 19:47:23 +01:00
test_config_flow.py Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567) 2023-09-19 18:58:46 +02:00
test_cover.py Update bond tests to use entity & device registry fixtures (#103708) 2023-11-09 19:47:23 +01:00
test_diagnostics.py Reduce bond fallback polling interval when BPUP is alive (#90871) 2023-04-08 23:12:42 -04:00
test_entity.py
test_fan.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_init.py Switch formatting from black to ruff-format (#102893) 2023-11-27 14:38:59 +01:00
test_light.py Update bond tests to use entity & device registry fixtures (#103708) 2023-11-09 19:47:23 +01:00
test_switch.py Update bond tests to use entity & device registry fixtures (#103708) 2023-11-09 19:47:23 +01:00