Enable more SIM ruff rules (#113015)
* SIM101 SIM103 * SIM107 SIM109 * SIM110 * SIM112 SIM113 * SIM115 * SIM116 * Fix * Fix * Fix
This commit is contained in:
parent
e96ef4613c
commit
cddce0ce0d
17 changed files with 41 additions and 70 deletions
|
@ -58,13 +58,11 @@ async def test_on_off_commands(
|
|||
|
||||
data = {ATTR_ENTITY_ID: entity_id}
|
||||
|
||||
count = 0
|
||||
services = ((SERVICE_TURN_ON, STATE_ON, "1"), (SERVICE_TURN_OFF, STATE_OFF, "0"))
|
||||
for service, new_state, new_value in services:
|
||||
count += 1
|
||||
for count, (service, new_state, new_value) in enumerate(services):
|
||||
await hass.services.async_call(PLATFORM_DOMAIN, service, data, blocking=True)
|
||||
robot._update_data({updated_field: new_value}, partial=True)
|
||||
|
||||
assert getattr(robot, robot_command).call_count == count
|
||||
assert getattr(robot, robot_command).call_count == count + 1
|
||||
assert (state := hass.states.get(entity_id))
|
||||
assert state.state == new_state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue