async def test_stop_cover(hass: core.HomeAssistant): """Tests that stop cover command delegates to API.""" await setup_platform(hass, COVER_DOMAIN, shades("name-1"), bond_device_id="test-device-id") with patch_bond_action() as mock_hold, patch_bond_device_state(): await hass.services.async_call( COVER_DOMAIN, SERVICE_STOP_COVER, {ATTR_ENTITY_ID: "cover.name_1"}, blocking=True, ) await hass.async_block_till_done() mock_hold.assert_called_once_with("test-device-id", Action.hold())
async def async_stop_cover(self, **kwargs: Any) -> None: """Hold cover.""" await self._hub.bond.action(self._device.device_id, Action.hold())