Skip to content

Commit

Permalink
fix(multiple_click): add edge case tests that was missing in the test…
Browse files Browse the repository at this point in the history
… suite and fix it
  • Loading branch information
xaviml committed Sep 29, 2020
1 parent e6f27fd commit 3db3371
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/controllerx/cx_core/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ async def multiple_click_call_action(self, kwargs) -> None:
)
self.click_counter[action_key] = 0
click_action_key = self.format_multiple_click_action(action_key, click_count)
if action_key in self.actions_mapping:
if action_key in self.actions_mapping and click_count == 1:
await self.call_action(action_key)
elif click_action_key in self.actions_mapping:
await self.call_action(click_action_key)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
entity_state_attributes:
supported_features: 191
entity_state: "on"
fired_actions: [1003, 0.05, 1003]
expected_calls:
- service: fake_service

0 comments on commit 3db3371

Please sign in to comment.