From a535e2c8dc84e31788ad6f77096292b6423038e5 Mon Sep 17 00:00:00 2001 From: Xavier Moreno Date: Sun, 4 Jul 2021 16:56:41 +0200 Subject: [PATCH] refactor(integ_tests): add entity_id to mocked attributes --- apps/controllerx/cx_core/type_controller.py | 4 ++-- .../action-types/arrow_left_click_test.yaml | 2 -- .../arrow_left_double_click_test.yaml | 2 -- .../arrow_left_quadruple_click_test.yaml | 2 -- .../arrow_left_quintuple_click_test.yaml | 2 -- .../arrow_left_sextuple_click_test.yaml | 2 -- .../arrow_left_triple_click_test.yaml | 2 -- .../action-types/arrow_right_click_test.yaml | 10 ++++---- .../brightness_down_click_test.yaml | 2 -- .../brightness_up_click_test.yaml | 8 +++---- .../integ_tests/action-types/toggle_test.yaml | 8 +++---- .../example_config_hold_test.yaml | 1 - .../example_config_toggle_xycolor_test.yaml | 18 +++++++-------- .../example_config/group_light_test.yaml | 3 +-- .../toggle_called_twice_test.yaml | 9 ++++---- tests/integ_tests/integ_test.py | 20 ++++++++-------- .../merge_mapping/brightness_up_test.yaml | 5 +--- .../merge_mapping/toggle_test.yaml | 9 +++----- .../xy_color_from_controller_test.yaml | 2 -- ...y_color_from_controller_test.yaml.disabled | 3 +-- .../deconz_event_1000_1click_test.yaml | 4 +--- .../deconz_event_1001_1click_test.yaml | 4 +--- .../deconz_event_1002_1click_test.yaml | 4 +--- .../deconz_event_1003_1click_test.yaml | 8 +++---- .../deconz_event_1003_2clicks_test.yaml | 4 +--- ...onz_event_1003_with_1004_2clicks_test.yaml | 4 +--- .../multiple_clicks/toggle_1_click_test.yaml | 4 +--- .../multiple_clicks/toggle_2_clicks_test.yaml | 4 +--- .../multiple_clicks/toggle_3_clicks_test.yaml | 4 +--- .../multiple_clicks/toggle_5_clicks_test.yaml | 7 +++--- .../multiple_clicks/toggle_8_clicks_test.yaml | 23 +++++++++++++++---- .../arrow_hold_test.yaml | 1 - .../toggle_full_brightness_test.yaml | 11 ++++----- .../toggle_full_color_temp_test.yaml | 11 ++++----- .../toggle_min_color_temp_test.yaml | 11 ++++----- .../zb5122/move_to_color_test.yaml | 2 -- 36 files changed, 84 insertions(+), 136 deletions(-) diff --git a/apps/controllerx/cx_core/type_controller.py b/apps/controllerx/cx_core/type_controller.py index 82377070..5f7f52d3 100644 --- a/apps/controllerx/cx_core/type_controller.py +++ b/apps/controllerx/cx_core/type_controller.py @@ -74,8 +74,8 @@ async def _get_entities(self, entity_name: str) -> Optional[List[str]]: f"Entities from `{entity_name}` (entity_id attribute): `{entities}`", level="DEBUG", ) - # When the entity is not a group, this attribute returns the entity name - if isinstance(entities, str): + # If the entity groups other entities, this attribute will be a list + if not isinstance(entities, (list, tuple)): return None if entities is not None and len(entities) == 0: raise ValueError(f"`{entity_name}` does not have any entities registered.") diff --git a/tests/integ_tests/action-types/arrow_left_click_test.yaml b/tests/integ_tests/action-types/arrow_left_click_test.yaml index 477e3b8c..4f111ab1 100644 --- a/tests/integ_tests/action-types/arrow_left_click_test.yaml +++ b/tests/integ_tests/action-types/arrow_left_click_test.yaml @@ -1,5 +1,3 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: [arrow_left_click] expected_calls: diff --git a/tests/integ_tests/action-types/arrow_left_double_click_test.yaml b/tests/integ_tests/action-types/arrow_left_double_click_test.yaml index 37c31ebc..b2b7f7ee 100644 --- a/tests/integ_tests/action-types/arrow_left_double_click_test.yaml +++ b/tests/integ_tests/action-types/arrow_left_double_click_test.yaml @@ -1,5 +1,3 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: [arrow_left_click, 0.05, arrow_left_click] expected_calls: diff --git a/tests/integ_tests/action-types/arrow_left_quadruple_click_test.yaml b/tests/integ_tests/action-types/arrow_left_quadruple_click_test.yaml index 5b844141..7e2dd404 100644 --- a/tests/integ_tests/action-types/arrow_left_quadruple_click_test.yaml +++ b/tests/integ_tests/action-types/arrow_left_quadruple_click_test.yaml @@ -1,5 +1,3 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: [ diff --git a/tests/integ_tests/action-types/arrow_left_quintuple_click_test.yaml b/tests/integ_tests/action-types/arrow_left_quintuple_click_test.yaml index a13ec914..69f80c4f 100644 --- a/tests/integ_tests/action-types/arrow_left_quintuple_click_test.yaml +++ b/tests/integ_tests/action-types/arrow_left_quintuple_click_test.yaml @@ -1,5 +1,3 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: [ diff --git a/tests/integ_tests/action-types/arrow_left_sextuple_click_test.yaml b/tests/integ_tests/action-types/arrow_left_sextuple_click_test.yaml index 73eb69a9..82e765d8 100644 --- a/tests/integ_tests/action-types/arrow_left_sextuple_click_test.yaml +++ b/tests/integ_tests/action-types/arrow_left_sextuple_click_test.yaml @@ -1,5 +1,3 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: [ diff --git a/tests/integ_tests/action-types/arrow_left_triple_click_test.yaml b/tests/integ_tests/action-types/arrow_left_triple_click_test.yaml index db920fc7..0d287277 100644 --- a/tests/integ_tests/action-types/arrow_left_triple_click_test.yaml +++ b/tests/integ_tests/action-types/arrow_left_triple_click_test.yaml @@ -1,5 +1,3 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: [arrow_left_click, 0.05, arrow_left_click, 0.05, arrow_left_click] diff --git a/tests/integ_tests/action-types/arrow_right_click_test.yaml b/tests/integ_tests/action-types/arrow_right_click_test.yaml index f655452c..5d467ad5 100644 --- a/tests/integ_tests/action-types/arrow_right_click_test.yaml +++ b/tests/integ_tests/action-types/arrow_right_click_test.yaml @@ -1,9 +1,7 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: [arrow_right_click] expected_calls: -- service: my_service - data: - attr1: 42 - attr2: foo + - service: my_service + data: + attr1: 42 + attr2: foo diff --git a/tests/integ_tests/action-types/brightness_down_click_test.yaml b/tests/integ_tests/action-types/brightness_down_click_test.yaml index 8207a174..fb79c525 100644 --- a/tests/integ_tests/action-types/brightness_down_click_test.yaml +++ b/tests/integ_tests/action-types/brightness_down_click_test.yaml @@ -1,5 +1,3 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: [brightness_down_click] expected_calls: diff --git a/tests/integ_tests/action-types/brightness_up_click_test.yaml b/tests/integ_tests/action-types/brightness_up_click_test.yaml index 7b02386e..175556c5 100644 --- a/tests/integ_tests/action-types/brightness_up_click_test.yaml +++ b/tests/integ_tests/action-types/brightness_up_click_test.yaml @@ -1,8 +1,6 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: [brightness_up_click] expected_calls: -- service: light/toggle - data: - entity_id: light.bedroom + - service: light/toggle + data: + entity_id: light.bedroom diff --git a/tests/integ_tests/action-types/toggle_test.yaml b/tests/integ_tests/action-types/toggle_test.yaml index 36154d7c..fe55e52f 100644 --- a/tests/integ_tests/action-types/toggle_test.yaml +++ b/tests/integ_tests/action-types/toggle_test.yaml @@ -1,8 +1,6 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: [toggle] expected_calls: -- service: light/toggle - data: - entity_id: light.bedroom + - service: light/toggle + data: + entity_id: light.bedroom diff --git a/tests/integ_tests/example_config/example_config_hold_test.yaml b/tests/integ_tests/example_config/example_config_hold_test.yaml index d7049ee8..f92f9d3c 100644 --- a/tests/integ_tests/example_config/example_config_hold_test.yaml +++ b/tests/integ_tests/example_config/example_config_hold_test.yaml @@ -1,5 +1,4 @@ entity_state_attributes: - supported_features: 191 brightness: 50 entity_state: "on" fired_actions: [brightness_up_hold, 0.450, brightness_up_release] diff --git a/tests/integ_tests/example_config/example_config_toggle_xycolor_test.yaml b/tests/integ_tests/example_config/example_config_toggle_xycolor_test.yaml index 5ba4be8c..9934ec5a 100644 --- a/tests/integ_tests/example_config/example_config_toggle_xycolor_test.yaml +++ b/tests/integ_tests/example_config/example_config_toggle_xycolor_test.yaml @@ -1,14 +1,12 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: [toggle, 1.0, toggle_hold] expected_calls: -- service: light/toggle - data: - entity_id: light.livingroom -- service: light/turn_on - data: - entity_id: light.livingroom - xy_color: !!python/tuple [0.323, 0.329] - brightness: 255 + - service: light/toggle + data: + entity_id: light.livingroom + - service: light/turn_on + data: + entity_id: light.livingroom + xy_color: !!python/tuple [0.323, 0.329] + brightness: 255 expected_calls_count: 2 diff --git a/tests/integ_tests/example_config/group_light_test.yaml b/tests/integ_tests/example_config/group_light_test.yaml index bc43e8d2..85045fb6 100644 --- a/tests/integ_tests/example_config/group_light_test.yaml +++ b/tests/integ_tests/example_config/group_light_test.yaml @@ -1,6 +1,5 @@ entity_state_attributes: - supported_features: 191 -entity_entities: ["light.bedroom_1", "light.bedroom_2"] + entity_id: ["light.bedroom_1", "light.bedroom_2"] entity_state: "off" fired_actions: [toggle] expected_calls: diff --git a/tests/integ_tests/example_config/toggle_called_twice_test.yaml b/tests/integ_tests/example_config/toggle_called_twice_test.yaml index 93017b93..ce84866c 100644 --- a/tests/integ_tests/example_config/toggle_called_twice_test.yaml +++ b/tests/integ_tests/example_config/toggle_called_twice_test.yaml @@ -1,10 +1,9 @@ # When the same action is called more than once within 300ms, # then we ignore the rest of the calls that fall between that time. -entity_state_attributes: - supported_features: 191 + entity_state: "off" fired_actions: [toggle, toggle] expected_calls: -- service: light/toggle - data: - entity_id: light.livingroom + - service: light/toggle + data: + entity_id: light.livingroom diff --git a/tests/integ_tests/integ_test.py b/tests/integ_tests/integ_test.py index 019e2c4b..88acd5e2 100644 --- a/tests/integ_tests/integ_test.py +++ b/tests/integ_tests/integ_test.py @@ -9,7 +9,7 @@ from cx_core.type_controller import TypeController from pytest_mock.plugin import MockerFixture -from tests.test_utils import fake_fn, get_controller +from tests.test_utils import get_controller def get_integ_tests(): @@ -29,8 +29,8 @@ def read_config_yaml(file_name): return list(data.values())[0] -def get_fake_entity_states(entity_state, entity_state_attributes): - async def inner(attribute: Optional[str] = None): +def get_fake_get_state(entity_state, entity_state_attributes): + async def inner(entity_name: str, attribute: Optional[str] = None): if attribute is not None and attribute in entity_state_attributes: return entity_state_attributes[attribute] return entity_state @@ -48,13 +48,16 @@ async def test_integ_configs( ): entity_state_attributes = data.get("entity_state_attributes", {}) entity_state = data.get("entity_state", None) - entity_entities = data.get("entity_entities", None) # Used for group entities fired_actions = data.get("fired_actions", []) render_template_response = data.get("render_template_response") extra = data.get("extra") expected_calls = data.get("expected_calls", []) expected_calls_count = data.get("expected_calls_count", len(expected_calls)) + if "supported_features" not in entity_state_attributes: + entity_state_attributes["supported_features"] = 0b1111111111 + if "entity_id" not in entity_state_attributes: + entity_state_attributes["entity_id"] = "my_entity" config = read_config_yaml(config_file) controller = get_controller(config["module"], config["class"]) if controller is None: @@ -67,13 +70,8 @@ async def test_integ_configs( ) if isinstance(controller, TypeController): - fake_entity_states = get_fake_entity_states( - entity_state, entity_state_attributes - ) - mocker.patch.object( - controller, "get_state", fake_fn(entity_entities, async_=True) - ) - mocker.patch.object(controller, "get_entity_state", fake_entity_states) + fake_get_state = get_fake_get_state(entity_state, entity_state_attributes) + mocker.patch.object(controller, "get_state", fake_get_state) call_service_stub = mocker.patch.object(Hass, "call_service") await controller.initialize() diff --git a/tests/integ_tests/merge_mapping/brightness_up_test.yaml b/tests/integ_tests/merge_mapping/brightness_up_test.yaml index e163d316..d2cb9d46 100644 --- a/tests/integ_tests/merge_mapping/brightness_up_test.yaml +++ b/tests/integ_tests/merge_mapping/brightness_up_test.yaml @@ -1,7 +1,4 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: [step_with_on_off_0_43_5] expected_calls: -- service: my_script - \ No newline at end of file + - service: my_script diff --git a/tests/integ_tests/merge_mapping/toggle_test.yaml b/tests/integ_tests/merge_mapping/toggle_test.yaml index 09b9a609..003092c7 100644 --- a/tests/integ_tests/merge_mapping/toggle_test.yaml +++ b/tests/integ_tests/merge_mapping/toggle_test.yaml @@ -1,9 +1,6 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: [toggle] expected_calls: -- service: light/toggle - data: - entity_id: light.my_light - \ No newline at end of file + - service: light/toggle + data: + entity_id: light.my_light diff --git a/tests/integ_tests/muller_licht_deconz/xy_color_from_controller_test.yaml b/tests/integ_tests/muller_licht_deconz/xy_color_from_controller_test.yaml index bfa129db..052ba637 100644 --- a/tests/integ_tests/muller_licht_deconz/xy_color_from_controller_test.yaml +++ b/tests/integ_tests/muller_licht_deconz/xy_color_from_controller_test.yaml @@ -1,5 +1,3 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: [6002] extra: diff --git a/tests/integ_tests/muller_licht_z2m/xy_color_from_controller_test.yaml.disabled b/tests/integ_tests/muller_licht_z2m/xy_color_from_controller_test.yaml.disabled index 5a5ecccd..2c46dd84 100644 --- a/tests/integ_tests/muller_licht_z2m/xy_color_from_controller_test.yaml.disabled +++ b/tests/integ_tests/muller_licht_z2m/xy_color_from_controller_test.yaml.disabled @@ -1,5 +1,4 @@ -entity_state_attributes: - supported_features: 191 + entity_state: "off" fired_actions: ["color_wheel"] extra: diff --git a/tests/integ_tests/multiple_clicks/deconz_event_1000_1click_test.yaml b/tests/integ_tests/multiple_clicks/deconz_event_1000_1click_test.yaml index b5086db5..ad7392fa 100644 --- a/tests/integ_tests/multiple_clicks/deconz_event_1000_1click_test.yaml +++ b/tests/integ_tests/multiple_clicks/deconz_event_1000_1click_test.yaml @@ -1,8 +1,6 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: [1000] expected_calls: - service: light/toggle data: - entity_id: light.bedroom \ No newline at end of file + entity_id: light.bedroom diff --git a/tests/integ_tests/multiple_clicks/deconz_event_1001_1click_test.yaml b/tests/integ_tests/multiple_clicks/deconz_event_1001_1click_test.yaml index 89b6f02d..61c62db6 100644 --- a/tests/integ_tests/multiple_clicks/deconz_event_1001_1click_test.yaml +++ b/tests/integ_tests/multiple_clicks/deconz_event_1001_1click_test.yaml @@ -1,8 +1,6 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: [1001] expected_calls: - service: light/toggle data: - entity_id: light.bedroom \ No newline at end of file + entity_id: light.bedroom diff --git a/tests/integ_tests/multiple_clicks/deconz_event_1002_1click_test.yaml b/tests/integ_tests/multiple_clicks/deconz_event_1002_1click_test.yaml index 08ffbf8a..f31c1af1 100644 --- a/tests/integ_tests/multiple_clicks/deconz_event_1002_1click_test.yaml +++ b/tests/integ_tests/multiple_clicks/deconz_event_1002_1click_test.yaml @@ -1,6 +1,4 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: [1002] expected_calls: - - service: fake_service1002 \ No newline at end of file + - service: fake_service1002 diff --git a/tests/integ_tests/multiple_clicks/deconz_event_1003_1click_test.yaml b/tests/integ_tests/multiple_clicks/deconz_event_1003_1click_test.yaml index 5734d0aa..46a01f09 100644 --- a/tests/integ_tests/multiple_clicks/deconz_event_1003_1click_test.yaml +++ b/tests/integ_tests/multiple_clicks/deconz_event_1003_1click_test.yaml @@ -1,8 +1,6 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: [1003] expected_calls: -- service: light/toggle - data: - entity_id: light.bedroom \ No newline at end of file + - service: light/toggle + data: + entity_id: light.bedroom diff --git a/tests/integ_tests/multiple_clicks/deconz_event_1003_2clicks_test.yaml b/tests/integ_tests/multiple_clicks/deconz_event_1003_2clicks_test.yaml index 59a15178..f8d13566 100644 --- a/tests/integ_tests/multiple_clicks/deconz_event_1003_2clicks_test.yaml +++ b/tests/integ_tests/multiple_clicks/deconz_event_1003_2clicks_test.yaml @@ -1,6 +1,4 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: [1003, 0.05, 1003] expected_calls: -- service: fake_service1003 \ No newline at end of file + - service: fake_service1003 diff --git a/tests/integ_tests/multiple_clicks/deconz_event_1003_with_1004_2clicks_test.yaml b/tests/integ_tests/multiple_clicks/deconz_event_1003_with_1004_2clicks_test.yaml index 9b193769..3a7cf0a9 100644 --- a/tests/integ_tests/multiple_clicks/deconz_event_1003_with_1004_2clicks_test.yaml +++ b/tests/integ_tests/multiple_clicks/deconz_event_1003_with_1004_2clicks_test.yaml @@ -1,6 +1,4 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: [1003, 0.05, 1004, 0.05, 1003] expected_calls: -- service: fake_service1003 \ No newline at end of file + - service: fake_service1003 diff --git a/tests/integ_tests/multiple_clicks/toggle_1_click_test.yaml b/tests/integ_tests/multiple_clicks/toggle_1_click_test.yaml index 296deefd..85f70bc3 100644 --- a/tests/integ_tests/multiple_clicks/toggle_1_click_test.yaml +++ b/tests/integ_tests/multiple_clicks/toggle_1_click_test.yaml @@ -1,6 +1,4 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: ["toggle"] expected_calls: - - service: fake_service1 \ No newline at end of file + - service: fake_service1 diff --git a/tests/integ_tests/multiple_clicks/toggle_2_clicks_test.yaml b/tests/integ_tests/multiple_clicks/toggle_2_clicks_test.yaml index 6ff8a023..694b72cf 100644 --- a/tests/integ_tests/multiple_clicks/toggle_2_clicks_test.yaml +++ b/tests/integ_tests/multiple_clicks/toggle_2_clicks_test.yaml @@ -1,6 +1,4 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: ["toggle", 0.05, "toggle"] expected_calls: - - service: fake_service2 \ No newline at end of file + - service: fake_service2 diff --git a/tests/integ_tests/multiple_clicks/toggle_3_clicks_test.yaml b/tests/integ_tests/multiple_clicks/toggle_3_clicks_test.yaml index 870caaa3..61e838f3 100644 --- a/tests/integ_tests/multiple_clicks/toggle_3_clicks_test.yaml +++ b/tests/integ_tests/multiple_clicks/toggle_3_clicks_test.yaml @@ -1,6 +1,4 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: ["toggle", 0.05, "toggle", 0.05, "toggle"] expected_calls: - - service: fake_service3 \ No newline at end of file + - service: fake_service3 diff --git a/tests/integ_tests/multiple_clicks/toggle_5_clicks_test.yaml b/tests/integ_tests/multiple_clicks/toggle_5_clicks_test.yaml index 0ff3daf2..8fb89995 100644 --- a/tests/integ_tests/multiple_clicks/toggle_5_clicks_test.yaml +++ b/tests/integ_tests/multiple_clicks/toggle_5_clicks_test.yaml @@ -1,6 +1,5 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" -fired_actions: ["toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle"] +fired_actions: + ["toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle"] expected_calls: - - service: fake_service5 \ No newline at end of file + - service: fake_service5 diff --git a/tests/integ_tests/multiple_clicks/toggle_8_clicks_test.yaml b/tests/integ_tests/multiple_clicks/toggle_8_clicks_test.yaml index c7b85698..f90e2c28 100644 --- a/tests/integ_tests/multiple_clicks/toggle_8_clicks_test.yaml +++ b/tests/integ_tests/multiple_clicks/toggle_8_clicks_test.yaml @@ -1,6 +1,21 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" -fired_actions: ["toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle"] +fired_actions: + [ + "toggle", + 0.05, + "toggle", + 0.05, + "toggle", + 0.05, + "toggle", + 0.05, + "toggle", + 0.05, + "toggle", + 0.05, + "toggle", + 0.05, + "toggle", + ] expected_calls: - - service: fake_service8 \ No newline at end of file + - service: fake_service8 diff --git a/tests/integ_tests/supported_features_field/arrow_hold_test.yaml b/tests/integ_tests/supported_features_field/arrow_hold_test.yaml index 7b21bbfe..2ad9c022 100644 --- a/tests/integ_tests/supported_features_field/arrow_hold_test.yaml +++ b/tests/integ_tests/supported_features_field/arrow_hold_test.yaml @@ -2,7 +2,6 @@ # from configuration, ControllerX should send color_temp and not xy_color # because light_mode is auto. entity_state_attributes: - supported_features: 0b1111111 # Everything supported from the device color_temp: 200 entity_state: "on" fired_actions: [arrow_right_hold, 0.450, arrow_right_release] diff --git a/tests/integ_tests/toggle_full_and_min/toggle_full_brightness_test.yaml b/tests/integ_tests/toggle_full_and_min/toggle_full_brightness_test.yaml index 49ffca41..24186525 100644 --- a/tests/integ_tests/toggle_full_and_min/toggle_full_brightness_test.yaml +++ b/tests/integ_tests/toggle_full_and_min/toggle_full_brightness_test.yaml @@ -1,10 +1,7 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: [toggle] expected_calls: -- service: light/toggle - data: - entity_id: light.my_light - brightness: 255 - \ No newline at end of file + - service: light/toggle + data: + entity_id: light.my_light + brightness: 255 diff --git a/tests/integ_tests/toggle_full_and_min/toggle_full_color_temp_test.yaml b/tests/integ_tests/toggle_full_and_min/toggle_full_color_temp_test.yaml index fe289dbd..0a4fec4f 100644 --- a/tests/integ_tests/toggle_full_and_min/toggle_full_color_temp_test.yaml +++ b/tests/integ_tests/toggle_full_and_min/toggle_full_color_temp_test.yaml @@ -1,10 +1,7 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: [brightness_up_click] expected_calls: -- service: light/toggle - data: - entity_id: light.my_light - color_temp: 300 - \ No newline at end of file + - service: light/toggle + data: + entity_id: light.my_light + color_temp: 300 diff --git a/tests/integ_tests/toggle_full_and_min/toggle_min_color_temp_test.yaml b/tests/integ_tests/toggle_full_and_min/toggle_min_color_temp_test.yaml index 9459d9ad..77680986 100644 --- a/tests/integ_tests/toggle_full_and_min/toggle_min_color_temp_test.yaml +++ b/tests/integ_tests/toggle_full_and_min/toggle_min_color_temp_test.yaml @@ -1,10 +1,7 @@ -entity_state_attributes: - supported_features: 191 entity_state: "on" fired_actions: [brightness_down_click] expected_calls: -- service: light/toggle - data: - entity_id: light.my_light - color_temp: 100 - \ No newline at end of file + - service: light/toggle + data: + entity_id: light.my_light + color_temp: 100 diff --git a/tests/integ_tests/zb5122/move_to_color_test.yaml b/tests/integ_tests/zb5122/move_to_color_test.yaml index 11003a77..4427dc1b 100644 --- a/tests/integ_tests/zb5122/move_to_color_test.yaml +++ b/tests/integ_tests/zb5122/move_to_color_test.yaml @@ -1,5 +1,3 @@ -entity_state_attributes: - supported_features: 191 entity_state: "off" fired_actions: ["move_to_color_temp"] extra: