Skip to content

Commit

Permalink
Revert "Increase Zigbee command retries (#93877)" (#94123)
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Jun 6, 2023
1 parent 83b0ec5 commit b03c429
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@

_LOGGER = logging.getLogger(__name__)

DEFAULT_REQUEST_RETRIES = 3


class AttrReportConfig(TypedDict, total=True):
"""Configuration to report for the attributes."""
Expand Down Expand Up @@ -80,8 +78,6 @@ def decorate_command(cluster_handler, command):

@wraps(command)
async def wrapper(*args, **kwds):
kwds.setdefault("tries", DEFAULT_REQUEST_RETRIES)

try:
result = await command(*args, **kwds)
cluster_handler.debug(
Expand Down
5 changes: 0 additions & 5 deletions tests/components/zha/test_alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ async def test_alarm_control_panel(
0,
security.IasAce.AudibleNotification.Default_Sound,
security.IasAce.AlarmStatus.No_Alarm,
tries=3,
)

# disarm from HA
Expand Down Expand Up @@ -135,7 +134,6 @@ async def test_alarm_control_panel(
0,
security.IasAce.AudibleNotification.Default_Sound,
security.IasAce.AlarmStatus.Emergency,
tries=3,
)

# reset the panel
Expand All @@ -159,7 +157,6 @@ async def test_alarm_control_panel(
0,
security.IasAce.AudibleNotification.Default_Sound,
security.IasAce.AlarmStatus.No_Alarm,
tries=3,
)

# arm_night from HA
Expand All @@ -180,7 +177,6 @@ async def test_alarm_control_panel(
0,
security.IasAce.AudibleNotification.Default_Sound,
security.IasAce.AlarmStatus.No_Alarm,
tries=3,
)

# reset the panel
Expand Down Expand Up @@ -278,6 +274,5 @@ async def reset_alarm_panel(hass, cluster, entity_id):
0,
security.IasAce.AudibleNotification.Default_Sound,
security.IasAce.AlarmStatus.No_Alarm,
tries=3,
)
cluster.client_command.reset_mock()
4 changes: 2 additions & 2 deletions tests/components/zha/test_device_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ async def test_action(hass: HomeAssistant, device_ias, device_inovelli) -> None:
5,
expect_reply=False,
manufacturer=4151,
tries=3,
tries=1,
tsn=None,
)
in cluster.request.call_args_list
Expand All @@ -345,7 +345,7 @@ async def test_action(hass: HomeAssistant, device_ias, device_inovelli) -> None:
5,
expect_reply=False,
manufacturer=4151,
tries=3,
tries=1,
tsn=None,
)
in cluster.request.call_args_list
Expand Down
2 changes: 1 addition & 1 deletion tests/components/zha/test_discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ async def test_devices(
),
expect_reply=True,
manufacturer=None,
tries=3,
tries=1,
tsn=None,
)
]
Expand Down

0 comments on commit b03c429

Please sign in to comment.