hass-core/tests/components/zha
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 Migrate internal ZHA data to a dataclasses (#100127) 2023-09-11 21:39:33 +02:00
conftest.py Bump ZHA dependencies (#104335) 2023-11-29 11:30:15 +01:00
data.py
test_alarm_control_panel.py Bump ZHA dependencies (#93989) 2023-06-14 21:42:31 -04:00
test_api.py Open a ZHA repair when network settings change (#99482) 2023-10-09 15:01:05 +02:00
test_backup.py Open a ZHA repair when network settings change (#99482) 2023-10-09 15:01:05 +02:00
test_base.py
test_binary_sensor.py Add test checking ZHA light restores with None attributes (#102806) 2023-11-15 10:45:35 +01:00
test_button.py Wrap most ZHA exceptions in HomeAssistantError (#98421) 2023-08-28 17:24:12 -04:00
test_climate.py Wrap most ZHA exceptions in HomeAssistantError (#98421) 2023-08-28 17:24:12 -04:00
test_cluster_handlers.py Migrate internal ZHA data to a dataclasses (#100127) 2023-09-11 21:39:33 +02:00
test_config_flow.py Bump ZHA dependencies (#104335) 2023-11-29 11:30:15 +01:00
test_cover.py Add ZHA cover tilt (#102072) 2023-10-24 15:40:41 -04:00
test_device.py
test_device_action.py Migrate internal ZHA data to a dataclasses (#100127) 2023-09-11 21:39:33 +02:00
test_device_tracker.py Bump ZHA dependencies (#93989) 2023-06-14 21:42:31 -04:00
test_device_trigger.py Open a ZHA repair when network settings change (#99482) 2023-10-09 15:01:05 +02:00
test_diagnostics.py Fix ZHA device diagnostics error for unknown unsupported attributes (#101239) 2023-10-06 12:23:48 -04:00
test_discover.py Add translation entiry support (zha) (#101909) 2023-10-17 21:59:49 +02:00
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_gateway.py Bump ZHA dependencies (#104335) 2023-11-29 11:30:15 +01:00
test_helpers.py
test_init.py Bump ZHA dependencies (#104335) 2023-11-29 11:30:15 +01:00
test_light.py Add test checking ZHA light restores with None attributes (#102806) 2023-11-15 10:45:35 +01:00
test_lock.py Bump ZHA dependencies (#93989) 2023-06-14 21:42:31 -04:00
test_logbook.py Don't require passing identifiers to DeviceRegistry.async_get_device (#96479) 2023-07-13 13:39:25 -04:00
test_number.py Wrap most ZHA exceptions in HomeAssistantError (#98421) 2023-08-28 17:24:12 -04:00
test_radio_manager.py Open a ZHA repair when network settings change (#99482) 2023-10-09 15:01:05 +02:00
test_registries.py Replace ZHA quirk class matching with quirk ID matching (#102482) 2023-10-24 17:18:10 -04:00
test_repairs.py Bump ZHA dependencies (#104335) 2023-11-29 11:30:15 +01:00
test_select.py Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
test_sensor.py Add translation entiry support (zha) (#101909) 2023-10-17 21:59:49 +02:00
test_silabs_multiprotocol.py Open a ZHA repair when network settings change (#99482) 2023-10-09 15:01:05 +02:00
test_siren.py Replace mock_coro with AsyncMock (#99014) 2023-08-25 22:54:55 +02:00
test_switch.py Migrate internal ZHA data to a dataclasses (#100127) 2023-09-11 21:39:33 +02:00
test_websocket_api.py Bump ZHA dependencies (#104335) 2023-11-29 11:30:15 +01:00
zha_devices_list.py Bump zha-quirks to 0.0.107 (#104683) 2023-11-29 09:19:02 +01:00