From 131573533accfc7588db2d17ee0730de2b530166 Mon Sep 17 00:00:00 2001 From: Xavier Moreno Date: Fri, 27 Nov 2020 20:53:14 +0100 Subject: [PATCH] test(controller): add integ tests for action_delta related to #165 --- .../called_multiple_diff_action_test.yaml | 2 ++ .../called_multiple_same_action_test.yaml | 2 ++ .../called_once_same_action_test copy.yaml | 2 ++ .../other_action_delta_attr/config.yaml | 17 +++++++++++++++++ 4 files changed, 23 insertions(+) create mode 100644 tests/integ_tests/other_action_delta_attr/called_multiple_diff_action_test.yaml create mode 100644 tests/integ_tests/other_action_delta_attr/called_multiple_same_action_test.yaml create mode 100644 tests/integ_tests/other_action_delta_attr/called_once_same_action_test copy.yaml create mode 100644 tests/integ_tests/other_action_delta_attr/config.yaml diff --git a/tests/integ_tests/other_action_delta_attr/called_multiple_diff_action_test.yaml b/tests/integ_tests/other_action_delta_attr/called_multiple_diff_action_test.yaml new file mode 100644 index 00000000..69686758 --- /dev/null +++ b/tests/integ_tests/other_action_delta_attr/called_multiple_diff_action_test.yaml @@ -0,0 +1,2 @@ +fired_actions: ["on_hold", 0.4, "off_hold", 0.4, "on_hold"] +expected_calls_count: 3 \ No newline at end of file diff --git a/tests/integ_tests/other_action_delta_attr/called_multiple_same_action_test.yaml b/tests/integ_tests/other_action_delta_attr/called_multiple_same_action_test.yaml new file mode 100644 index 00000000..19b7820b --- /dev/null +++ b/tests/integ_tests/other_action_delta_attr/called_multiple_same_action_test.yaml @@ -0,0 +1,2 @@ +fired_actions: ["on_hold", 0.6, "on_hold", 0.6, "on_hold"] +expected_calls_count: 3 \ No newline at end of file diff --git a/tests/integ_tests/other_action_delta_attr/called_once_same_action_test copy.yaml b/tests/integ_tests/other_action_delta_attr/called_once_same_action_test copy.yaml new file mode 100644 index 00000000..b879ba64 --- /dev/null +++ b/tests/integ_tests/other_action_delta_attr/called_once_same_action_test copy.yaml @@ -0,0 +1,2 @@ +fired_actions: ["on_hold", 0.4, "on_hold", 0.4, "on_hold"] +expected_calls_count: 1 \ No newline at end of file diff --git a/tests/integ_tests/other_action_delta_attr/config.yaml b/tests/integ_tests/other_action_delta_attr/config.yaml new file mode 100644 index 00000000..dec724ce --- /dev/null +++ b/tests/integ_tests/other_action_delta_attr/config.yaml @@ -0,0 +1,17 @@ +light_chambre_chevet: + module: controllerx + class: HueDimmerController + controller: 00:17:88:01:10:5e:5a:f6 + integration: zha + light: light.chevet + smooth_power_on: true + action_delta: 500 + merge_mapping: + on_hold: + - service: cover.open_cover + data: + entity_id: cover.chambre + off_hold: + - service: cover.open_cover + data: + entity_id: cover.chambre \ No newline at end of file