core/homeassistant/components/demo
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
air_quality.py
alarm_control_panel.py
binary_sensor.py
button.py
calendar.py
camera.py
climate.py
config_flow.py
const.py
cover.py
date.py
datetime.py
demo_0.jpg
demo_0.png
demo_1.jpg
demo_1.png
demo_2.jpg
demo_2.png
demo_3.jpg
demo_3.png
device_tracker.py
event.py
fan.py
geo_location.py
humidifier.py
image_processing.py
light.py
lock.py
mailbox.py
manifest.json
media_player.py
notify.py
number.py
remote.py
select.py
sensor.py
services.yaml
siren.py
strings.json
stt.py
switch.py
text.py
time.py
tts.mp3
tts.py
update.py
vacuum.py
water_heater.py
weather.py